From: Michal Schmidt Date: Mon, 13 Jun 2011 12:19:53 +0000 (+0200) Subject: systemctl: fix a FILE* leak X-Git-Tag: v29~10 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b647f10da7c7e737ad8f5193cb1ca5dc3c2b5d45;p=elogind.git systemctl: fix a FILE* leak In practice it does not really matter, but let's be nice and close the file. --- diff --git a/src/systemctl.c b/src/systemctl.c index 889e3ee06..2bd173c5d 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -4172,8 +4172,10 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo if (streq(verb, "is-enabled") && strv_isempty(i->aliases) && strv_isempty(i->wanted_by) && - !path_startswith(filename, "/etc")) + !path_startswith(filename, "/etc")) { + fclose(f); return 1; + } n_symlinks += strv_length(i->aliases); n_symlinks += strv_length(i->wanted_by);