summaryrefslogtreecommitdiff
path: root/src/modules-load.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-31 15:35:40 +0200
committerLennart Poettering <lennart@poettering.net>2011-03-31 15:35:40 +0200
commitda19d5c19f60ec80e1733b1e994311c59c6eda73 (patch)
tree1df3b703d728471e1051e23778f857bf4adff23f /src/modules-load.c
parentba1a55152c50dfbcd3d4a64353b95f4a2f37985e (diff)
src: our lord is coverity
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;