cvs: php4(PHP_4_3) /main streams.c

From: Date: Sat, 23 Nov 2002 01:17:39 +0000
Subject: cvs: php4(PHP_4_3) /main streams.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-16572@lists.php.net to get a copy of this message
helly Fri Nov 22 20:17:39 2002 EDT Modified files: (Branch: PHP_4_3) /php4/main streams.c Log: Fix memleak in debug mode Index: php4/main/streams.c diff -u php4/main/streams.c:1.125.2.14 php4/main/streams.c:1.125.2.15 --- php4/main/streams.c:1.125.2.14 Mon Nov 18 07:43:00 2002 +++ php4/main/streams.c Fri Nov 22 20:17:39 2002 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.125.2.14 2002/11/18 12:43:00 wez Exp $ */ +/* $Id: streams.c,v 1.125.2.15 2002/11/23 01:17:39 helly Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -2315,7 +2315,7 @@ return stream; case PHP_STREAM_RELEASED: #if ZEND_DEBUG - newstream->__orig_path = copy_of_path; + newstream->__orig_path = estrdup(path); #endif return newstream; default: @@ -2337,8 +2337,9 @@ } tidy_wrapper_error_log(wrapper TSRMLS_CC); #if ZEND_DEBUG - if (stream == NULL && copy_of_path != NULL) + if (stream == NULL && copy_of_path != NULL) { efree(copy_of_path); + } #endif return stream; }

« previous php.cvs (#16572) next »