summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-08-25 23:50:02 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-08-25 23:52:18 +0200
commit21e5a0bea08243ba230e889f6af261ff96145f1f (patch)
treed94852b693e53f4b02e74e39d890e5a9915eed44
parent13918f62ff4c01484a0885c749c04020d47c9765 (diff)
test-util: fix a memleak
-rw-r--r--src/test/test-util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test-util.c b/src/test/test-util.c
index 3c1bac4606..dff38ab6f6 100644
--- a/src/test/test-util.c
+++ b/src/test/test-util.c
@@ -1539,6 +1539,7 @@ static void test_extract_first_word(void) {
p = original = "\"";
assert_se(extract_first_word(&p, &t, NULL, 0) == 1);
assert_se(streq(t, "\""));
+ free(t);
assert_se(isempty(p));
p = original = "\"";
@@ -1548,6 +1549,7 @@ static void test_extract_first_word(void) {
p = original = "\'";
assert_se(extract_first_word(&p, &t, NULL, 0) == 1);
assert_se(streq(t, "\'"));
+ free(t);
assert_se(isempty(p));
p = original = "\'";
@@ -1557,6 +1559,7 @@ static void test_extract_first_word(void) {
p = original = "\'fooo";
assert_se(extract_first_word(&p, &t, NULL, 0) == 1);
assert_se(streq(t, "\'fooo"));
+ free(t);
assert_se(isempty(p));
p = original = "\'fooo";