From e3e5407dee775891dc221b73897857b0c8106093 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Tue, 27 Dec 2005 14:52:02 +0000 Subject: [PATCH] Merge r5429 (fix for: memcheck/tests/mempool reads freed memory) git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_1_BRANCH@5450 --- coregrind/m_hashtable.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/coregrind/m_hashtable.c b/coregrind/m_hashtable.c index 98d041355b..eec3c319c6 100644 --- a/coregrind/m_hashtable.c +++ b/coregrind/m_hashtable.c @@ -234,11 +234,12 @@ void* VG_(HT_Next)(VgHashTable table) void VG_(HT_destruct)(VgHashTable table) { - UInt i; - VgHashNode* node; + UInt i; + VgHashNode *node, *node_next; for (i = 0; i < table->n_chains; i++) { - for (node = table->chains[i]; node != NULL; node = node->next) { + for (node = table->chains[i]; node != NULL; node = node_next) { + node_next = node->next; VG_(free)(node); } } -- 2.47.2