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 f3370e89f7..22eb976f7d 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -747,6 +747,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 |