lpsmith/postgresql-libpq — pull request #6 by joeyadams (2012-08-21 19:01:45+00:00)
Title: Prevent double free caused by bug in Foreign.Concurrent

This is a workaround for a bug in [Foreign.Concurrent.newForeignPtr][1]. It causes a double free when a `Connection` is finalized by the garbage collector, then `finish`ed explicitly by the application. See [GHC ticket ~~#7170~~][2].

[1]: http://hackage.haskell.org/packages/archive/base/4.5.1.0/doc/html/Foreign-Concurrent.html#v:newForeignPtr

[2]: http://hackage.haskell.org/trac/ghc/ticket/7170