Help with memory leak on zend_call_function
| From: | BohwaZ/PHP | Date: | Thu, 17 Oct 2019 13:40:29 +0000 |
| Subject: | Help with memory leak on zend_call_function | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-107567@lists.php.net to get a copy of this message | ||
Hi all,
I am working on this PR: https://github.com/php/php-src/pull/4797
It implements the ability to set a userland callback function that would allow or deny SQL queries in SQLite using its internal authorizer logic. This is a native feature of SQLite that is currently missing from the PHP extension.
It's quite straightforward, but I could not find much documentation on zend_call_function and fci/fcc.
So I just tried to find existing examples that did the same (calling a userland function callback from the C extension) and mostly used the one from libxml.
So it works well, but I'm stuck on a memory leak, even though I'm using zend_fcall_info_args_clear.
I'm not sure what's going on here and why.
So if someone could take a look or point me in the right direction, that would be great :)
Thanks!