]> granicus.if.org Git - php/commitdiff
MF51: fix #37077 (stream_socket_server() leaks when the port is not allowed)
authorAntony Dovgal <tony2001@php.net>
Fri, 14 Apr 2006 10:01:34 +0000 (10:01 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 14 Apr 2006 10:01:34 +0000 (10:01 +0000)
ext/standard/streamsfuncs.c

index e42f4a500120e728bec4107ed2199e368ecaa126..d96382367bdc8df4d68fbea3843f73667036b512 100644 (file)
@@ -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;
        }