From d3d47ccbc933ee34151f0b42b83553a2f0e2b181 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Mon, 30 Mar 2020 14:03:03 +0200 Subject: Properly error-check reading the idfile. Fixes #3 (Gitlab issue#). --- fetchmail.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'fetchmail.c') diff --git a/fetchmail.c b/fetchmail.c index 0db805d7..69d80e23 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -373,10 +373,13 @@ int main(int argc, char **argv) { int st; - if (!versioninfo && (st = prc_filecheck(run.idfile, !versioninfo)) != 0) + if (!versioninfo && (st = prc_filecheck(run.idfile, !versioninfo)) != 0) { exit(st); - else - initialize_saved_lists(querylist, run.idfile); + } else { + if ((st = initialize_saved_lists(querylist, run.idfile))) { + exit(st); + } + } } #endif /* POP3_ENABLE */ -- cgit v1.2.3