summaryrefslogtreecommitdiff
path: root/src/core/automount.c
diff options
context:
space:
mode:
authorRonny Chevalier <chevalier.ronny@gmail.com>2014-06-24 19:00:32 +0200
committerTom Gundersen <teg@jklm.no>2014-06-24 19:09:57 +0200
commite1d758033dc7e101ab32323a0f1649d8daf56a22 (patch)
treea1688425a3c125569b34dc0e28318361245b2bc8 /src/core/automount.c
parent6ec60d20724d2a32e20d25ef75d2af178c242bc2 (diff)
use more _cleanup_ macro
Diffstat (limited to 'src/core/automount.c')
-rw-r--r--src/core/automount.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index 65e6d6f179..73a8ce17e4 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -144,7 +144,7 @@ static int automount_add_default_dependencies(Automount *a) {
static int automount_verify(Automount *a) {
bool b;
- char *e;
+ _cleanup_free_ char *e = NULL;
assert(a);
if (UNIT(a)->load_state != UNIT_LOADED)
@@ -160,7 +160,6 @@ static int automount_verify(Automount *a) {
return -ENOMEM;
b = unit_has_name(UNIT(a), e);
- free(e);
if (!b) {
log_error_unit(UNIT(a)->id, "%s's Where setting doesn't match unit name. Refusing.", UNIT(a)->id);