aboutsummaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-27 16:48:41 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-27 16:48:41 -0400
commit82d5865479c791b6f82b70bd53d7f02e1cd276d5 (patch)
tree95d10166db8830ec6b1101dc72193decbbcf8ae2 /Utility
parent951ca752077065110ecf714348e5fb0489b57130 (diff)
fix a minor fd leak
Diffstat (limited to 'Utility')
-rw-r--r--Utility/Daemon.hs2
1 files changed, 1 insertions, 1 deletions
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