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

index 6502c430642a1a2dfb3639db2661ca03625950f8..54bbc1093aa1c30ac6133f2e764d2832f22d35a3 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;
        }