systemctl: fix a FILE* leak

In practice it does not really matter, but let's be nice and close the
file.
This commit is contained in:
Michal Schmidt
2011-06-14 21:59:14 +02:00
committed by Lennart Poettering
parent b77398f7a0
commit b647f10da7
+3 -1
View File
@@ -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);