lzlib 0.3.0.3 → 0.3.0.4
raw patch · 3 files changed
+9/−5 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- lzlib.cabal +1/−1
- src/Codec/Lzip.hs +4/−4
CHANGELOG.md view
@@ -1,5 +1,9 @@ # lzlib +## 0.3.0.4++ * Use `bracket` and fix space leak+ ## 0.3.0.3 * Use `bracket` so that memory is freed if an exception is thrown in another
lzlib.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: lzlib-version: 0.3.0.3+version: 0.3.0.4 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2019 Vanessa McHale
src/Codec/Lzip.hs view
@@ -119,10 +119,10 @@ encoder <- lZCompressOpen (fromIntegral $ dictionarySize sz) (fromIntegral matchLenLimit) (fromIntegral memberSize) let delta = sz `div` 4 + 64- newBytes <- mallocBytes delta- res <- loop encoder bss (newBytes, delta) 0 mempty-- void $ lZCompressClose encoder+ res <-bracket+ (mallocBytes delta)+ ((lZCompressClose encoder *>) . free)+ (\newBytes -> loop encoder bss (newBytes, delta) 0 mempty) pure (BSL.fromChunks res)