diff options
author | Michael Vetter <jubalh@iodoru.org> | 2019-10-06 17:43:10 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2019-10-06 17:43:10 +0200 |
commit | 4f11140bb5ad66d211e8b78fe32cd8ecc521d2b9 (patch) | |
tree | 8e3ff3a737190cd967109d310abfb56e4368c3ad /tests | |
parent | 897dfbb3c1f74961ab068e460b99a128a270efb8 (diff) | |
download | profani-tty-4f11140bb5ad66d211e8b78fe32cd8ecc521d2b9.tar.gz |
Fix memleak in test_parser unittest
Regards https://github.com/profanity-im/profanity/issues/1019
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/test_parser.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/unittests/test_parser.c b/tests/unittests/test_parser.c index faefc9c7..695c3cf4 100644 --- a/tests/unittests/test_parser.c +++ b/tests/unittests/test_parser.c @@ -457,6 +457,7 @@ get_first_of_one(void **state) char *result = get_start(inp, 2); assert_string_equal("one", result); + free(result); } void @@ -466,6 +467,7 @@ get_first_of_two(void **state) char *result = get_start(inp, 2); assert_string_equal("one ", result); + free(result); } void @@ -475,6 +477,7 @@ get_first_two_of_three(void **state) char *result = get_start(inp, 3); assert_string_equal("one two ", result); + free(result); } void @@ -484,6 +487,7 @@ get_first_two_of_three_first_quoted(void **state) char *result = get_start(inp, 3); assert_string_equal("\"one\" two ", result); + free(result); } void @@ -493,6 +497,7 @@ get_first_two_of_three_second_quoted(void **state) char *result = get_start(inp, 3); assert_string_equal("one \"two\" ", result); + free(result); } void @@ -502,6 +507,7 @@ get_first_two_of_three_first_and_second_quoted(void **state) char *result = get_start(inp, 3); assert_string_equal("\"one\" \"two\" ", result); + free(result); } void @@ -659,4 +665,4 @@ parse_options_with_duplicated_option_sets_error(void **state) assert_false(res); options_destroy(options); -} \ No newline at end of file +} |