Skip to content

Commit

Permalink
Free mem in cjson_set_valuestring_should_return_null_if_strings_overlap
Browse files Browse the repository at this point in the history
  • Loading branch information
vwvw authored and Alanscut committed Aug 30, 2024
1 parent 4f4d7f7 commit 078c4e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/misc_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ static void cjson_set_valuestring_should_return_null_if_strings_overlap(void)
/* If it overlaps, the string will be messed up.*/
TEST_ASSERT_TRUE(strcmp(str, "bcde") == 0);
TEST_ASSERT_NULL(str2);
cJSON_Delete(obj);
}

static void *CJSON_CDECL failing_realloc(void *pointer, size_t size)
Expand Down

0 comments on commit 078c4e6

Please sign in to comment.