diff options
author | Wez Furlong <wez@php.net> | 2001-05-12 00:45:55 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2001-05-12 00:45:55 +0000 |
commit | 340c56e5c7aebbb41a4d8c37fa7a45100090d5c4 (patch) | |
tree | 24891cbd5d20e488e29cbfcc1018cd3ac813b9d4 /ext/pcre/php_pcre.c | |
parent | be3b514637e12dd116d6f470a91e502fa992aeaf (diff) | |
download | php-git-340c56e5c7aebbb41a4d8c37fa7a45100090d5c4.tar.gz |
Fixed leak.
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 9289adc035..4344591cd6 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -970,7 +970,7 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_callabl 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 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_callabl zval_copy_ctor(return_value); return; } + if (callback_name) + efree(callback_name); SEPARATE_ZVAL(regex); SEPARATE_ZVAL(subject); |