From: Mathieu Desnoyers Date: Wed, 6 Jul 2011 17:37:19 +0000 (-0400) Subject: rculfhash test: add missing free X-Git-Tag: v0.7.0~43^2~222 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=742aa1dbb547cfb316afab100c7a7dfd07375478;p=userspace-rcu.git rculfhash test: add missing free Signed-off-by: Mathieu Desnoyers --- 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 */