diff options
Diffstat (limited to 'main/streams/xp_socket.c')
-rw-r--r-- | main/streams/xp_socket.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index 46b23b63ad..5313a84b72 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -750,6 +750,10 @@ static inline int php_tcp_sockop_connect(php_stream *stream, php_netstream_data_ return -1; } bindto = parse_ip_address_ex(Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval), &bindport, xparam->want_errortext, &xparam->outputs.error_text); + if (bindto == NULL) { + efree(host); + return -1; + } } #ifdef SO_BROADCAST |