Commit 828d455
committed
Avoid a memory leak in fwrite(compress="gzip")
Previously, the zlib object zstrm was initialized whenever compression
was enabled, at least in order to calculate the buffer size for the
compressed data stream, but was only used for compression and
subsequently deallocated only when there was a header with column names.
Make sure to deflateEnd(&strm) even if there was no header.1 parent 855886d commit 828d455
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
929 | 935 | | |
930 | 936 | | |
931 | 937 | | |
| |||
0 commit comments