summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-03-24 16:48:13 +0100
committerFelix Fietkau <nbd@openwrt.org>2009-03-24 16:48:13 +0100
commit25e6437875b2953f6b5706359e17db84334e7877 (patch)
tree8045dfd71d2cb5f482ba634df62a90d12f802f77
parentc60702b55cf8efe9dcd359fc9aa8e9c7cd421ada (diff)
downloaduci-0.7.4.tar.gz
add missing fflush() on close - fixes a bug in the lock/unlock order (thx, Cyrus)v0.7.4
-rw-r--r--util.c1
1 files changed, 1 insertions, 0 deletions
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);