When calling free_result_buffers(), also free field metadata and
restore the mempool state to what it was before any allocations
have been made. Remove the mempool save/restore logic for the
inner result set as this is now handled on a higher level.
This commit is contained in:
Nikita Popov 2019-09-12 13:17:27 +02:00
parent 31f617d9bc
commit df982da587
3 changed files with 19 additions and 16 deletions

View file

@ -200,6 +200,9 @@ PHPAPI void
mysqlnd_mempool_restore_state(MYSQLND_MEMORY_POOL * pool)
{
DBG_ENTER("mysqlnd_mempool_restore_state");
#if ZEND_DEBUG
ZEND_ASSERT(pool->checkpoint);
#endif
if (pool->checkpoint) {
mysqlnd_arena_release(&pool->arena, pool->checkpoint);
pool->last = NULL;