From c0a7c7bf0d4412fd9436962704cb26f9596e529f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 29 Jul 2022 21:27:27 +0200 Subject: [PATCH] config: reset errno before calling getline() again Related to #1107 --- config.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.c b/config.c index 7a746aea..fbeab3e6 100644 --- a/config.c +++ b/config.c @@ -2639,6 +2639,9 @@ parse_config_file(FILE *f, struct config *conf, const char *path, bool errors_ar if (!section_parser(ctx)) error_or_continue(); + + /* For next iteration of getline() */ + errno = 0; } if (errno != 0) {