summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bus-proxyd/test-bus-policy.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bus-proxyd/test-bus-policy.c b/src/bus-proxyd/test-bus-policy.c
index 900e4d2b06..7bcebef905 100644
--- a/src/bus-proxyd/test-bus-policy.c
+++ b/src/bus-proxyd/test-bus-policy.c
@@ -46,18 +46,17 @@
static int test_policy_load(Policy *p, const char *name)
{
- char *path;
+ _cleanup_free_ char *path = NULL;
int r = 0;
path = strjoin(TEST_DIR, "/bus-policy/", name, NULL);
+ assert_se(path);
if (access(path, R_OK) == 0)
policy_load(p, STRV_MAKE(path));
else
r = -ENOENT;
- free(path);
-
return r;
}