summaryrefslogtreecommitdiff
path: root/src/tmpfiles/tmpfiles.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-19 17:52:41 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-19 17:53:50 +0100
commite26da2dcea2f56461a8411e64d046cb5d903275c (patch)
tree34378e1e07a25e580cbfcd0afcfd0012b6fb213d /src/tmpfiles/tmpfiles.c
parent833fce2857bcf9cba316d3f8c37af8997b6a80ab (diff)
tmpfiles: simplification
Diffstat (limited to 'src/tmpfiles/tmpfiles.c')
-rw-r--r--src/tmpfiles/tmpfiles.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index b0efa37e20..6e36dc79dd 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -731,7 +731,7 @@ static int create_item(Item *i) {
break;
case CREATE_SYMLINK: {
- char *x;
+ _cleanup_free_ char *x = NULL;
label_context_set(i->path, S_IFLNK);
r = symlink(i->argument, i->path);
@@ -751,12 +751,10 @@ static int create_item(Item *i) {
}
if (!streq(i->argument, x)) {
- free(x);
log_error("%s is not the right symlinks.", i->path);
return -EEXIST;
}
- free(x);
break;
}