From: Antony Dovgal Date: Fri, 14 Apr 2006 10:00:55 +0000 (+0000) Subject: fix #37077 (stream_socket_server() leaks when the port is not allowed) X-Git-Tag: php-5.1.3RC3~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c42ddb8e0e50f9b83cd6f5fe8c00cfaab480faa;p=php 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 6502c43064..54bbc1093a 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; }