]> granicus.if.org Git - php/commitdiff
don't leak on error
authorAntony Dovgal <tony2001@php.net>
Thu, 21 Dec 2006 01:07:52 +0000 (01:07 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 21 Dec 2006 01:07:52 +0000 (01:07 +0000)
main/streams/xp_socket.c

index 15fd3d252a9bbcf8abb2d8f1f2a108017c420b89..ad7cce2a240d89d72d458841270dd764f3db0081 100644 (file)
@@ -642,6 +642,7 @@ static inline int php_tcp_sockop_connect(php_stream *stream, php_netstream_data_
                        if (xparam->want_errortext) {
                                spprintf(&xparam->outputs.error_text, 0, "local_addr context option is not a string.");
                        }
+                       efree(host);
                        return -1;
                }
                bindto = parse_ip_address_ex(Z_STRVAL_PP(tmpzval), Z_STRLEN_PP(tmpzval), &bindport, xparam->want_errortext, &xparam->outputs.error_text TSRMLS_CC);