Skip to content
This repository
Browse code

Fix leaking with undefined key to release

  • Loading branch information...
commit 95527c11019b770bf9f806eb821087b0ddae011d 1 parent ded57a8
Michael Snoyman authored June 12, 2012
2  resourcet/Control/Monad/Trans/Resource.hs
@@ -242,7 +242,7 @@ instance Exception InvalidAccess
242 242
 release' :: I.IORef ReleaseMap
243 243
          -> ReleaseKey
244 244
          -> IO ()
245  
-release' istate (ReleaseKey key) = E.mask $ \restore -> do
  245
+release' istate (ReleaseKey key) = E.mask $ \restore -> key `seq` do
246 246
     maction <- I.atomicModifyIORef istate lookupAction
247 247
     maybe (return ()) restore maction
248 248
   where
2  resourcet/resourcet.cabal
... ...
@@ -1,5 +1,5 @@
1 1
 Name:                resourcet
2  
-Version:             0.3.2.1
  2
+Version:             0.3.2.2
3 3
 Synopsis:            Deterministic allocation and freeing of scarce resources.
4 4
 Description:
5 5
 	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 notes on commit 95527c1

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