cvs: php4 /ext/pcre php_pcre.c

From: Date: Sat, 12 May 2001 00:45:55 +0000
Subject: cvs: php4 /ext/pcre php_pcre.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5678@lists.php.net to get a copy of this message
wez Fri May 11 17:45:55 2001 EDT Modified files: /php4/ext/pcre php_pcre.c Log: Fixed leak. Index: php4/ext/pcre/php_pcre.c diff -u php4/ext/pcre/php_pcre.c:1.93 php4/ext/pcre/php_pcre.c:1.94 --- php4/ext/pcre/php_pcre.c:1.93 Fri May 4 09:43:53 2001 +++ php4/ext/pcre/php_pcre.c Fri May 11 17:45:55 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c,v 1.93 2001/05/04 16:43:53 andrei Exp $ */ +/* $Id: php_pcre.c,v 1.94 2001/05/12 00:45:55 wez Exp $ */ #include "php.h" #include "php_globals.h" @@ -970,7 +970,7 @@ int limit_val = -1; char *string_key; ulong num_key; - char *callback_name; + char *callback_name = NULL; /* Get function parameters and do error-checking. */ if (ZEND_NUM_ARGS() < 3 || ZEND_NUM_ARGS() > 4 || @@ -989,6 +989,8 @@ zval_copy_ctor(return_value); return; } + if (callback_name) + efree(callback_name); SEPARATE_ZVAL(regex); SEPARATE_ZVAL(subject);

« previous php.cvs (#5678) next »