don't leak on error

This commit is contained in:
Antony Dovgal 2006-12-21 01:07:52 +00:00
parent cbadf38682
commit 7a6b75e8ac

View File

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