From f4b85a0fb68bd5f67498697e35f813aee430cfb2 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Wed, 14 Dec 2016 00:31:53 +0000 Subject: test-fs-util: fix memleak Fixes: ``` $ ./libtool --mode=execute valgrind --leak-check=full ./test-fs-util ... ==22871== ==22871== 27 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==22871== at 0x4C2FC47: realloc (vg_replace_malloc.c:785) ==22871== by 0x4E86D05: strextend (string-util.c:726) ==22871== by 0x4E8F347: chase_symlinks (fs-util.c:712) ==22871== by 0x109EBF: test_chase_symlinks (test-fs-util.c:75) ==22871== by 0x10C381: main (test-fs-util.c:305) ==22871== ``` Closes #4888 --- src/test/test-fs-util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c index b502cd0ad1..ae68587be9 100644 --- a/src/test/test-fs-util.c +++ b/src/test/test-fs-util.c @@ -78,6 +78,7 @@ static void test_chase_symlinks(void) { assert_se(mkdir(q, 0700) >= 0); + result = mfree(result); r = chase_symlinks(p, temp, 0, &result); assert_se(r > 0); assert_se(path_equal(result, q)); -- cgit v1.2.3-54-g00ecf