diff options
author | Nuno Lopes <nlopess@php.net> | 2006-11-09 16:34:00 +0000 |
---|---|---|
committer | Nuno Lopes <nlopess@php.net> | 2006-11-09 16:34:00 +0000 |
commit | 667f469349b09a5232311c4429bac552ce974d8b (patch) | |
tree | cdf55a8d066716cfb342233629e5b9e15519014a | |
parent | 3717adbbd9baf2d21568e5d138a5ee5af929dad4 (diff) | |
download | php-git-667f469349b09a5232311c4429bac552ce974d8b.tar.gz |
MFB: fix possible segfault
-rw-r--r-- | ext/filter/callback_filter.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/filter/callback_filter.c b/ext/filter/callback_filter.c index a825a5dc38..fd8ed2d4cd 100644 --- a/ext/filter/callback_filter.c +++ b/ext/filter/callback_filter.c @@ -42,15 +42,14 @@ void php_filter_callback(PHP_INPUT_FILTER_PARAM_DECL) if (retval_ptr != value) { zval_dtor(value); COPY_PZVAL_TO_ZVAL(*value, retval_ptr); + } else { + zval_ptr_dtor(&retval_ptr); } } else { zval_dtor(value); Z_TYPE_P(value) = IS_NULL; } - if (retval_ptr) { - zval_ptr_dtor(&retval_ptr); - } efree(args); } |