From: Antony Dovgal Date: Fri, 14 Apr 2006 10:01:34 +0000 (+0000) Subject: MF51: fix #37077 (stream_socket_server() leaks when the port is not allowed) X-Git-Tag: RELEASE_1_3~67 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=becb273c16cdea533b920f4b9cd877f2a55de002;p=php MF51: fix #37077 (stream_socket_server() leaks when the port is not allowed) --- diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index e42f4a5001..d96382367b 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -207,6 +207,8 @@ PHP_FUNCTION(stream_socket_server) /* no need to dup; we need to efree buf anyway */ zval_dtor(zerrstr); ZVAL_STRING(zerrstr, errstr, 0); + } else if (errstr) { + efree(errstr); } RETURN_FALSE; }