|
From: <sv...@va...> - 2012-02-27 21:57:19
|
Author: philippe
Date: 2012-02-27 21:52:45 +0000 (Mon, 27 Feb 2012)
New Revision: 12407
Log:
Fix one more leak detected by running memcheck in memcheck
(started to run regression tests in an outer)
Modified:
trunk/memcheck/mc_leakcheck.c
Modified: trunk/memcheck/mc_leakcheck.c
===================================================================
--- trunk/memcheck/mc_leakcheck.c 2012-02-27 11:02:20 UTC (rev 12406)
+++ trunk/memcheck/mc_leakcheck.c 2012-02-27 21:52:45 UTC (rev 12407)
@@ -943,10 +943,11 @@
// proper printing of the deltas between previous search and this search.
n_lossrecords = get_lr_array_from_lr_table();
for (i = 0; i < n_lossrecords; i++) {
- if (lr_array[i]->num_blocks == 0)
+ if (lr_array[i]->num_blocks == 0) {
// remove from lr_table the old loss_records with 0 bytes found
VG_(OSetGen_Remove) (lr_table, &lr_array[i]->key);
- else {
+ VG_(OSetGen_FreeNode)(lr_table, lr_array[i]);
+ } else {
// move the leak sizes to old_* and zero the current sizes
// for next leak search
lr_array[i]->old_szB = lr_array[i]->szB;
|