test: fix issues in test to fix memleak
This commit is contained in:
parent
34dff6aaf9
commit
a63eb385b4
@ -112,11 +112,7 @@ spec("hashtable") {
|
||||
value *value = value_new(1337);
|
||||
check(value_hashtable_insert(hashtable, key, value) == 0);
|
||||
check(value != NULL, "value should not be NULL");
|
||||
//value_destroy(&value);
|
||||
free(value);
|
||||
free(value);
|
||||
value_new(1234);
|
||||
free(NULL);
|
||||
value_destroy(&value);
|
||||
}
|
||||
|
||||
it("should return 0 with NULL as this param") {
|
||||
|
||||
@ -135,7 +135,7 @@ spec("list") {
|
||||
it("should return 0 with NULL as this param") {
|
||||
value *value = value_new(1);
|
||||
check(value_list_unshift(NULL, value) == 0, "return should not be 0");
|
||||
//value_destroy(&value);
|
||||
value_destroy(&value);
|
||||
}
|
||||
|
||||
it("should return 0 with NULL as valueElement param") {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user