haskell/unix — pull request #32 by redneb (2014-12-23 06:28:56+00:00)
Title: rewrite getWorkingDirectory to use allocaBytes for exception safety

Currently, the implementation of `getWorkingDirectory` uses `mallocBytes`/`free` directly, without `bracket` or `allocaBytes`. Therefore it will leak space in the event of an (asynchronous) exception.