Skip to content

Commit

Permalink
Small memory use-after-free problem in test.c (thanks @IronBug)
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie Gunyon committed Nov 28, 2017
1 parent 54edc13 commit 629b754
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -2783,7 +2783,6 @@ static void test_string(void **state) {
assert_true(cmp_write_str_v4(&cmp, str16, 300));
assert_true(cmp_write_str_v4(&cmp, str32, 70000));

free(str8);
free(str16);
free(str32);

Expand Down Expand Up @@ -2817,6 +2816,8 @@ static void test_string(void **state) {
assert_true(cmp_read_object(&cmp, &obj));
assert_false(cmp_object_to_str(&cmp, &obj, str8, 5));
assert_true(cmp_object_to_str(&cmp, &obj, str8, 6));

free(str8);
}

static void test_array(void **state) {
Expand Down

0 comments on commit 629b754

Please sign in to comment.