From: Derick Rethans Date: Mon, 4 Jul 2011 15:06:46 +0000 (+0100) Subject: Fix efree(NULL) when no arguments are passed in. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=f42cd14d2dee0a83dfae463ceb5d2d0da15e6b7e;p=konrad%2Ftwig.git Fix efree(NULL) when no arguments are passed in. --- diff --git a/twig.c b/twig.c index e1b98ef..cf79f54 100644 --- a/twig.c +++ b/twig.c @@ -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; }