diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-06-04 16:07:51 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-06-04 16:17:35 +0200 |
commit | 574132342b29e61a3ee3315434c744f19605ed28 (patch) | |
tree | 7300c0865748c74d945b3647c5183abe4593f538 /src/lib | |
parent | 6bfe0080bf347a1f4baad32070913b2edfd27214 (diff) | |
download | ouroboros-574132342b29e61a3ee3315434c744f19605ed28.tar.gz ouroboros-574132342b29e61a3ee3315434c744f19605ed28.zip |
lib: Fix memleak in hashtable test
The element was not freed if insertion failed.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/tests/hashtable_test.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/tests/hashtable_test.c b/src/lib/tests/hashtable_test.c index d8cc73c5..e3127743 100644 --- a/src/lib/tests/hashtable_test.c +++ b/src/lib/tests/hashtable_test.c @@ -64,6 +64,7 @@ int hashtable_test(int argc, char ** argv) if (htable_insert(table, i, (void *) j, 1)) { printf("Failed to insert.\n"); htable_destroy(table); + free(j); return -1; } } |