summaryrefslogtreecommitdiff
path: root/src/test/test-unit-name.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-19 16:43:41 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-20 00:01:05 +0100
commite1ba963fdf13f4057b9089e0c732e6c1eb69901e (patch)
tree452d5e33127bf02a77e61558565a5944995818f5 /src/test/test-unit-name.c
parent575ccc1b6900f1f8e5c32da71f42f4d855659622 (diff)
tests: fix minor memory leak
Diffstat (limited to 'src/test/test-unit-name.c')
-rw-r--r--src/test/test-unit-name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c
index 256e820c22..ab6c488cff 100644
--- a/src/test/test-unit-name.c
+++ b/src/test/test-unit-name.c
@@ -135,7 +135,7 @@ static int test_unit_printf(void) {
#define expect(unit, pattern, expected) \
{ \
char *e; \
- _cleanup_free_ char *t; \
+ _cleanup_free_ char *t = NULL; \
assert_se(unit_full_printf(unit, pattern, &t) >= 0); \
printf("result: %s\nexpect: %s\n", t, expected); \
if ((e = endswith(expected, "*"))) \