chiark / gitweb /
tests: fix resource & mem leaks
[elogind.git] / src / test / test-condition-util.c
index 4ee5600ff6a648131352927c482f51510fd419ea..35ee9167bffb83936acd36c088373c3379b0390c 100644 (file)
@@ -45,7 +45,7 @@ static void test_condition_test_host(void) {
         sd_id128_t id;
         int r;
         char sid[SD_ID128_STRING_MAX];
-        char *hostname;
+        _cleanup_free_ char *hostname = NULL;
 
         r = sd_id128_get_machine(&id);
         assert_se(r >= 0);