From e8a135d1279857d626c53b1ca0ce8da2824e1a91 Mon Sep 17 00:00:00 2001 From: Wilco Baan Hofman Date: Mon, 28 Nov 2016 17:37:07 +0100 Subject: [PATCH] Fix leaking file handle for log messages when something fails. --- status.c | 1 + 1 file changed, 1 insertion(+) diff --git a/status.c b/status.c index 0ef9d74..3f450a9 100644 --- a/status.c +++ b/status.c @@ -50,6 +50,7 @@ STATUS debug(int loglevel, const char *location, const char *function, ...) fprintf(stderr, "%s", text); } fprintf(logfile, "%s", text); + fclose(logfile); return ST_GENERAL_FAILURE; }