fix a minor fd leak

This commit is contained in:
Joey Hess 2013-05-27 16:48:41 -04:00
parent 853ec68253
commit edc3bf2347

View file

@ -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