From 742aa1dbb547cfb316afab100c7a7dfd07375478 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 6 Jul 2011 13:37:19 -0400 Subject: [PATCH] rculfhash test: add missing free Signed-off-by: Mathieu Desnoyers --- tests/test_urcu_hash.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_urcu_hash.c b/tests/test_urcu_hash.c index 44b9531..9281667 100644 --- a/tests/test_urcu_hash.c +++ b/tests/test_urcu_hash.c @@ -38,7 +38,7 @@ #endif #define HASH_SIZE 32 -#define RAND_POOL 1000 +#define RAND_POOL 10000 /* Make this big enough to include the POWER5+ L3 cacheline size of 256B */ #define CACHE_LINE_SIZE 4096 @@ -407,9 +407,10 @@ void *thr_writer(void *_count) (void *) 0x42); ret = ht_add_unique(test_ht, node); rcu_read_unlock(); - if (ret) + if (ret) { + free(node); nr_addexist++; - else + } else nr_add++; } else { /* May delete */ -- 2.34.1