From: Felix Fietkau Date: Tue, 24 Mar 2009 15:48:13 +0000 (+0100) Subject: add missing fflush() on close - fixes a bug in the lock/unlock order (thx, Cyrus) X-Git-Url: http://pilppa.org/gitweb/?p=uci.git;a=commitdiff_plain;h=25e6437875b2953f6b5706359e17db84334e7877 add missing fflush() on close - fixes a bug in the lock/unlock order (thx, Cyrus) --- 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);