diff options
| author | root <[email protected]> | 2024-10-25 06:27:34 +0000 |
|---|---|---|
| committer | root <[email protected]> | 2024-10-25 06:27:34 +0000 |
| commit | 12241e65805b3e202ec6e1c8a816971f6bfecb91 (patch) | |
| tree | a8f0b89e28e9de74f2ff10a8f4619d20c146dc30 /test/maat_framework_gtest.cpp | |
| parent | b66307704547add235ba590dc0341c641eae768a (diff) | |
fix memory leak in test casev5.0.0
Diffstat (limited to 'test/maat_framework_gtest.cpp')
| -rw-r--r-- | test/maat_framework_gtest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/maat_framework_gtest.cpp b/test/maat_framework_gtest.cpp index 99f430b..17ee7b2 100644 --- a/test/maat_framework_gtest.cpp +++ b/test/maat_framework_gtest.cpp @@ -7830,6 +7830,8 @@ void foreign_key_test_entry_cb(const char *table_name, const char *table_line, e strcpy(file2_to_del, file2_localname); g_test_foreign_del_OK = 1; } + + cJSON_Delete(json); } TEST_F(MaatCmd, SetFile) { @@ -8012,6 +8014,8 @@ void plugin_ex_new_cb(const char *table_name, const char *key, EXPECT_TRUE(tmp_obj != NULL); snprintf(u->name, sizeof(u->name), "%s", tmp_obj->valuestring); + cJSON_Delete(json); + *ad = u; (*counter)++; } |
