From 82d5865479c791b6f82b70bd53d7f02e1cd276d5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 27 May 2013 16:48:41 -0400 Subject: fix a minor fd leak --- Utility/Daemon.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utility/Daemon.hs b/Utility/Daemon.hs index e1cd25088..ad0950de2 100644 --- a/Utility/Daemon.hs +++ b/Utility/Daemon.hs @@ -93,7 +93,7 @@ checkDaemon pidfile = do Just fd -> do locked <- getLock fd (ReadLock, AbsoluteSeek, 0, 0) p <- readish <$> readFile pidfile - return $ check locked p + closeFd fd `after` return (check locked p) Nothing -> return Nothing where check Nothing _ = Nothing -- cgit v1.2.3