diff options
author | Toon Schoenmakers <toon.schoenmakers@copernica.com> | 2014-11-25 11:45:47 +0100 |
---|---|---|
committer | Toon Schoenmakers <toon.schoenmakers@copernica.com> | 2014-11-25 11:45:47 +0100 |
commit | da4de6cb1097471b2659c102d55a646cbc9e0f41 (patch) | |
tree | 1d3cdff8d534b76c5e1e4f8855a7f706516aa4a2 /zend/callable.cpp | |
parent | 945748c19b966fff297d9a7a1e2dfda3b0a80754 (diff) |
Fixed a memory leak when returning a Php::Object with an already allocated Basev1.2.2
Diffstat (limited to 'zend/callable.cpp')
-rw-r--r-- | zend/callable.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zend/callable.cpp b/zend/callable.cpp index 7505bbf..f0dc3e8 100644 --- a/zend/callable.cpp +++ b/zend/callable.cpp @@ -51,12 +51,12 @@ void Callable::invoke(INTERNAL_FUNCTION_PARAMETERS) { // get the result Value result(callable->invoke(params)); - + // we're ready if the return value is not even used if (!return_value_used) return; - + // @todo php 5.6 has a RETVAL_ZVAL_FAST macro that can be used instead (and is faster) - + // return a full copy of the zval, and do not destruct it RETVAL_ZVAL(result._val, 1, 0); } |