Permalink
Browse files

inflate: free memory on port close if needed

git-svn-id: https://code.call-cc.org/svn/chicken-eggs/release/4/zlib/trunk@23183 fca3e652-9b03-0410-8d7b-ac86a6ce46c4
  • Loading branch information...
1 parent 52d3aad commit 7532cb37610f23fe133ac3ba6e65a95e590b8a42 joseph.gay committed Mar 22, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 zlib.scm
View
@@ -127,7 +127,9 @@
(not eof?))
(lambda ()
(unless (= ret Z_STREAM_END)
- (warning "~A\n" "not finished with inflate")))))))
+ (warning "~A\n" "not finished with inflate"))
+ (unless eof? ; free up memory
+ (inflate-end stream)))))))
(define deflate-init (foreign-lambda int "deflateInit" z-stream int))
(define deflate (foreign-lambda int "deflate" z-stream int))

0 comments on commit 7532cb3

Please sign in to comment.