X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fautomount.c;h=73a8ce17e4a7052e1e29c38cfdcb08696b7ac064;hp=65e6d6f179219aba14996e61b9f59c226e9e021b;hb=06b643e7f5a3b79005dd57497897ab7255fe3659;hpb=3d94f76c99da13e5603831d0b278f8c8c21bcb02 diff --git a/src/core/automount.c b/src/core/automount.c index 65e6d6f17..73a8ce17e 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);