summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/srptool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/srptool.c b/src/srptool.c
index a9715e6a37..9326ac4dad 100644
--- a/src/srptool.c
+++ b/src/srptool.c
@@ -310,14 +310,14 @@ verify_passwd(const char *conffile, const char *tpasswd,
}
while (p != NULL && atoi(p) != iindex);
+ fclose(fp);
+
if (p == NULL) {
fprintf(stderr, "Cannot find entry in %s\n", conffile);
return -1;
}
line[sizeof(line) - 1] = 0;
- fclose(fp);
-
if (read_conf_values(&g, &n, line) < 0) {
fprintf(stderr, "Cannot parse conf file '%s'\n", conffile);
return -1;