tony2001 Fri Apr 14 10:00:55 2006 UTC
Modified files: (Branch: PHP_5_1)
/php-src/ext/standard streamsfuncs.c
Log:
fix #37077 (stream_socket_server() leaks when the port is not allowed)
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.4&r2=1.58.2.5&diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.4
php-src/ext/standard/streamsfuncs.c:1.58.2.5
--- php-src/ext/standard/streamsfuncs.c:1.58.2.4 Mon Apr 3 09:14:33 2006
+++ php-src/ext/standard/streamsfuncs.c Fri Apr 14 10:00:55 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streamsfuncs.c,v 1.58.2.4 2006/04/03 09:14:33 tony2001 Exp $ */
+/* $Id: streamsfuncs.c,v 1.58.2.5 2006/04/14 10:00:55 tony2001 Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -207,6 +207,8 @@
/* 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;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php