summaryrefslogtreecommitdiff
path: root/src/modules-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules-load.c')
-rw-r--r--src/modules-load.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules-load.c b/src/modules-load.c
index 2dd432695f..3824b57de7 100644
--- a/src/modules-load.c
+++ b/src/modules-load.c
@@ -99,17 +99,21 @@ int main(int argc, char *argv[]) {
}
f = fopen(fn, "re");
- free(fn);
if (!f) {
- if (errno == ENOENT)
+ if (errno == ENOENT) {
+ free(fn);
continue;
+ }
log_error("Failed to open %s: %m", fn);
+ free(fn);
r = EXIT_FAILURE;
continue;
}
+ free(fn);
+
for (;;) {
char line[LINE_MAX], *l, *t;