bjori Tue Jun 20 18:09:33 2006 UTC
Modified files:
/php-src/main/streams streams.c
Log:
Plug memleak (leaks on empty files)
http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.124&r2=1.125&diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.124
php-src/main/streams/streams.c:1.125
--- php-src/main/streams/streams.c:1.124 Sun May 14 18:35:40 2006
+++ php-src/main/streams/streams.c Tue Jun 20 18:09:33 2006
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.124 2006/05/14 18:35:40 helly Exp $ */
+/* $Id: streams.c,v 1.125 2006/06/20 18:09:33 bjori Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -1635,7 +1635,7 @@
p = php_stream_mmap_range(src, php_stream_tell(src), maxlen,
PHP_STREAM_MAP_MODE_SHARED_READONLY, &mapped);
- if (p) {
+ if (p && mapped) {
*buf = pemalloc_rel_orig(mapped + 1, persistent);
if (*buf) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php