Fix efree(NULL) when no arguments are passed in.

This commit is contained in:
Derick Rethans
2011-07-04 16:06:46 +01:00
parent 577169c515
commit f42cd14d2d
+4 -1
View File
@@ -207,7 +207,10 @@ zval *TWIG_CALL_USER_FUNC_ARRAY(zval *object, char *function, zval *arguments)
if (zend_call_function(&fci, NULL TSRMLS_CC) == FAILURE) {
zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", zend_get_class_entry(object)->name, function);
}
efree(fci.params);
if (args) {
efree(fci.params);
}
return retval_ptr;
}