From df982da5874856e3a4d6bbbefb8d3be97261a6cf Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 12 Sep 2019 13:17:27 +0200 Subject: Fix bug #78525 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. --- ext/mysqlnd/mysqlnd_block_alloc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/mysqlnd/mysqlnd_block_alloc.c') diff --git a/ext/mysqlnd/mysqlnd_block_alloc.c b/ext/mysqlnd/mysqlnd_block_alloc.c index 10f6bd3b6d..cba7530c8d 100644 --- a/ext/mysqlnd/mysqlnd_block_alloc.c +++ b/ext/mysqlnd/mysqlnd_block_alloc.c @@ -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; -- cgit v1.2.1