chiark / gitweb /
test-fileio: use random name for written file
[elogind.git] / src / test / test-path-util.c
index 127e178..f396b32 100644 (file)
@@ -56,7 +56,7 @@ static void test_path(void) {
         assert_se(streq(path_get_file_name("file.../"), ""));
 
 #define test_parent(x, y) {                                \
-                char *z;                                   \
+                char _cleanup_free_ *z = NULL;             \
                 int r = path_get_parent(x, &z);            \
                 printf("expected: %s\n", y ? y : "error"); \
                 printf("actual: %s\n", r<0 ? "error" : z); \