diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2016-12-14 00:31:53 +0000 |
---|---|---|
committer | Evgeny Vereshchagin <evvers@ya.ru> | 2016-12-14 00:31:53 +0000 |
commit | f4b85a0fb68bd5f67498697e35f813aee430cfb2 (patch) | |
tree | 692184008421c27608d1077cca28ab0bbce970ac | |
parent | 4014818d530ad3f6f5e4b94b79a9336376feface (diff) |
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
-rw-r--r-- | src/test/test-fs-util.c | 1 |
1 files changed, 1 insertions, 0 deletions
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)); |