From 25e6437875b2953f6b5706359e17db84334e7877 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 24 Mar 2009 16:48:13 +0100 Subject: [PATCH] add missing fflush() on close - fixes a bug in the lock/unlock order (thx, Cyrus) --- util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util.c b/util.c index cb88968..9843058 100644 --- a/util.c +++ b/util.c @@ -478,6 +478,7 @@ static void uci_close_stream(FILE *stream) if (!stream) return; + fflush(stream); fd = fileno(stream); flock(fd, LOCK_UN); fclose(stream); -- 2.11.0