From 7c42ddb8e0e50f9b83cd6f5fe8c00cfaab480faa Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Fri, 14 Apr 2006 10:00:55 +0000 Subject: [PATCH] fix #37077 (stream_socket_server() leaks when the port is not allowed) --- ext/standard/streamsfuncs.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.40.0