From a95e5a956322b7310f72df0016889288f2909ce6 Mon Sep 17 00:00:00 2001 From: sin Date: Fri, 7 Feb 2014 13:23:34 +0000 Subject: Don't leak the fifofd if we re-init the fifo --- sinit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sinit.c') diff --git a/sinit.c b/sinit.c index 14ee7ca..0bb6503 100644 --- a/sinit.c +++ b/sinit.c @@ -129,6 +129,8 @@ sigfifo(void) { if (!fifopath) return; + if (fifofd != -1) + close(fifofd); unlink(fifopath); umask(0); if (mkfifo(fifopath, 0600) < 0) -- cgit v1.2.3-54-g00ecf