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

index 7c764bed90790a66cb77f487e0fe20dff17269bd..f2b14e8be9dd8f599d91861bc8e32fd855723ae9 100644 (file)
@@ -1180,6 +1180,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) {