🐞 fix(utable): fix memleak in test case
This commit is contained in:
4
deps/utable/test/unit_test_utable.cpp
vendored
4
deps/utable/test/unit_test_utable.cpp
vendored
@@ -601,7 +601,7 @@ TEST(utable_test, replace_8k_cstring)
|
||||
utable_free(table);
|
||||
}
|
||||
|
||||
TEST(utable_test, replace_cstring_many_times)
|
||||
TEST(utable_test, replace_cstring_1w_times)
|
||||
{
|
||||
struct utable *table = utable_new();
|
||||
|
||||
@@ -614,7 +614,7 @@ TEST(utable_test, replace_cstring_many_times)
|
||||
|
||||
test_utable_assert_str(table, "key1", str);
|
||||
|
||||
for(int i=0; i<100000; i++)
|
||||
for(int i=0; i<10000; i++)
|
||||
{
|
||||
utable_delete(table, "key1", strlen("key1"));
|
||||
utable_add_cstring(table, "key1", str, strlen(str));
|
||||
|
||||
Reference in New Issue
Block a user