1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Fix memleak in test_parser unittest

Regards https://github.com/profanity-im/profanity/issues/1019
This commit is contained in:
Michael Vetter 2019-10-06 17:43:10 +02:00
parent 897dfbb3c1
commit 4f11140bb5

View File

@ -457,6 +457,7 @@ get_first_of_one(void **state)
char *result = get_start(inp, 2); char *result = get_start(inp, 2);
assert_string_equal("one", result); assert_string_equal("one", result);
free(result);
} }
void void
@ -466,6 +467,7 @@ get_first_of_two(void **state)
char *result = get_start(inp, 2); char *result = get_start(inp, 2);
assert_string_equal("one ", result); assert_string_equal("one ", result);
free(result);
} }
void void
@ -475,6 +477,7 @@ get_first_two_of_three(void **state)
char *result = get_start(inp, 3); char *result = get_start(inp, 3);
assert_string_equal("one two ", result); assert_string_equal("one two ", result);
free(result);
} }
void void
@ -484,6 +487,7 @@ get_first_two_of_three_first_quoted(void **state)
char *result = get_start(inp, 3); char *result = get_start(inp, 3);
assert_string_equal("\"one\" two ", result); assert_string_equal("\"one\" two ", result);
free(result);
} }
void void
@ -493,6 +497,7 @@ get_first_two_of_three_second_quoted(void **state)
char *result = get_start(inp, 3); char *result = get_start(inp, 3);
assert_string_equal("one \"two\" ", result); assert_string_equal("one \"two\" ", result);
free(result);
} }
void void
@ -502,6 +507,7 @@ get_first_two_of_three_first_and_second_quoted(void **state)
char *result = get_start(inp, 3); char *result = get_start(inp, 3);
assert_string_equal("\"one\" \"two\" ", result); assert_string_equal("\"one\" \"two\" ", result);
free(result);
} }
void void