diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2011-06-13 14:19:53 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-06-14 21:59:14 +0200 |
commit | b647f10da7c7e737ad8f5193cb1ca5dc3c2b5d45 (patch) | |
tree | d4c6c39ae77dce4eb6a91d5438d6891e589b4ff8 /src | |
parent | b77398f7a05aa313cebcea81e9381833bede2d61 (diff) |
systemctl: fix a FILE* leak
In practice it does not really matter, but let's be nice and close the
file.
Diffstat (limited to 'src')
-rw-r--r-- | src/systemctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/systemctl.c b/src/systemctl.c index 889e3ee064..2bd173c5d0 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); |