chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test-bus-policy: silence coverity
[elogind.git]
/
src
/
bus-proxyd
/
test-bus-policy.c
diff --git
a/src/bus-proxyd/test-bus-policy.c
b/src/bus-proxyd/test-bus-policy.c
index 900e4d2b067e3d4bde308c4639d4603dc2afbe62..7bcebef905cc73ca5f3c22cd00512de6f3e7b1be 100644
(file)
--- 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)
{
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);
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;
if (access(path, R_OK) == 0)
policy_load(p, STRV_MAKE(path));
else
r = -ENOENT;
- free(path);
-
return r;
}
return r;
}