]> granicus.if.org Git - php/commitdiff
- Fix memleak (found by colder)
authorMarcus Boerger <helly@php.net>
Mon, 14 Jan 2008 18:13:12 +0000 (18:13 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 14 Jan 2008 18:13:12 +0000 (18:13 +0000)
Zend/zend_execute_API.c

index d5a323de6a681075df2eba79435e0fafcdfdedf3..29632a2bad3f51ffe6ea9eeb497f16736415fd58 100644 (file)
@@ -1082,6 +1082,10 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
                {
                        INIT_PZVAL(*fci->retval_ptr_ptr);
                }*/
+               if (EG(exception) && fci->retval_ptr_ptr) {
+                       zval_ptr_dtor(fci->retval_ptr_ptr);
+                       fci->retval_ptr_ptr = NULL;
+               }
        }
        zend_ptr_stack_clear_multiple(TSRMLS_C);
        if (call_via_handler) {