Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[test] Fixed memory leak in a unit test
  • Loading branch information
monich committed Aug 25, 2022
1 parent a760ed8 commit 595659a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test_misc/test_misc.c
Expand Up @@ -795,6 +795,9 @@ test_bytes_prefix(
g_assert(gutil_bytes_has_prefix(bytes, TEST_ARRAY_AND_SIZE(prefix)));
g_assert(!gutil_bytes_has_prefix(bytes, TEST_ARRAY_AND_SIZE(not_prefix)));
g_assert(!gutil_bytes_has_prefix(bytes, TEST_ARRAY_AND_SIZE(too_long)));

g_bytes_unref(empty);
g_bytes_unref(bytes);
}

/*==========================================================================*
Expand Down Expand Up @@ -824,6 +827,9 @@ test_bytes_suffix(
g_assert(gutil_bytes_has_suffix(bytes, TEST_ARRAY_AND_SIZE(suffix)));
g_assert(!gutil_bytes_has_suffix(bytes, TEST_ARRAY_AND_SIZE(not_suffix)));
g_assert(!gutil_bytes_has_suffix(bytes, TEST_ARRAY_AND_SIZE(too_long)));

g_bytes_unref(empty);
g_bytes_unref(bytes);
}

/*==========================================================================*
Expand Down

0 comments on commit 595659a

Please sign in to comment.