]> granicus.if.org Git - php/commitdiff
Fixed a memory leak.
authorIlia Alshanetsky <iliaa@php.net>
Fri, 24 Jan 2003 16:34:20 +0000 (16:34 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 24 Jan 2003 16:34:20 +0000 (16:34 +0000)
zend_error -> php_error_docref.

ext/yp/yp.c

index 136ad6b98ce075421d69e42f5bb8f853f3adc25b..7fda2f0e04f96b08339055c217d7dac33a6a35c6 100644 (file)
@@ -241,7 +241,11 @@ static int php_foreach_all (int instatus, char *inkey, int inkeylen, char *inval
 
        if(call_user_function_ex(CG(function_table), NULL, *((zval **)indata), &retval, 3, args, 0, NULL TSRMLS_CC) != SUCCESS)
        {
-               zend_error(E_ERROR, "Function call failed");
+               zval_ptr_dtor(&status);
+               zval_ptr_dtor(&key);
+               zval_ptr_dtor(&value);
+
+               php_error_docref(NULL TSRMLS_CC, E_ERROR, "Function call failed");
                return 1;
        }