cvs: php-src(PHP_5_2) /main/streams streams.c

From: Date: Tue, 20 Jun 2006 18:09:50 +0000
Subject: cvs: php-src(PHP_5_2) /main/streams streams.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-38820@lists.php.net to get a copy of this message
bjori Tue Jun 20 18:09:50 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/main/streams streams.c Log: MFH: plug memleak http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.82.2.6.2.2&r2=1.82.2.6.2.3&diff_format=u Index: php-src/main/streams/streams.c diff -u php-src/main/streams/streams.c:1.82.2.6.2.2 php-src/main/streams/streams.c:1.82.2.6.2.3 --- php-src/main/streams/streams.c:1.82.2.6.2.2 Fri Jun 16 14:09:01 2006 +++ php-src/main/streams/streams.c Tue Jun 20 18:09:50 2006 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.82.2.6.2.2 2006/06/16 14:09:01 rasmus Exp $ */ +/* $Id: streams.c,v 1.82.2.6.2.3 2006/06/20 18:09:50 bjori Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -1216,7 +1216,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) {

« previous php.cvs (#38820) next »