Skip to content
Browse files

Fix leaking with undefined key to release

  • Loading branch information...
1 parent ded57a8 commit 95527c11019b770bf9f806eb821087b0ddae011d @snoyberg committed
Showing with 2 additions and 2 deletions.
  1. +1 −1 resourcet/Control/Monad/Trans/Resource.hs
  2. +1 −1 resourcet/resourcet.cabal
View
2 resourcet/Control/Monad/Trans/Resource.hs
@@ -242,7 +242,7 @@ instance Exception InvalidAccess
release' :: I.IORef ReleaseMap
-> ReleaseKey
-> IO ()
-release' istate (ReleaseKey key) = E.mask $ \restore -> do
+release' istate (ReleaseKey key) = E.mask $ \restore -> key `seq` do
maction <- I.atomicModifyIORef istate lookupAction
maybe (return ()) restore maction
where
View
2 resourcet/resourcet.cabal
@@ -1,5 +1,5 @@
Name: resourcet
-Version: 0.3.2.1
+Version: 0.3.2.2
Synopsis: Deterministic allocation and freeing of scarce resources.
Description:
This package was originally included with the conduit package, and has since been split off. For more information, please see <http://www.yesodweb.com/book/conduits>.

0 comments on commit 95527c1

Please sign in to comment.
Something went wrong with that request. Please try again.