Close BZ2 compressed files on cr_close
authorPatrick Uiterwijk <puiterwijk@redhat.com>
Wed, 28 Sep 2016 12:09:07 +0000 (12:09 +0000)
committerPatrick Uiterwijk <puiterwijk@redhat.com>
Wed, 28 Sep 2016 12:21:08 +0000 (12:21 +0000)
commit35ae4edd9a6abef11fbdbfef5e717ba6eee6f8ee
tree704e9cd84cd2b36af0c35b8ed4e29f5203859295
parenteb61dac3ca96f4bc240431011756397f9217c9cf
Close BZ2 compressed files on cr_close

Per bzip2 documentation: "BZ2_bzReadClose does not call fclose on the underlying file
handle, so you should do that yourself if appropriate.".
This patch adds a INNERFILE element to CR_FILE to keep track of the FILE object so we
can properly close the file on cr_close.

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
src/compression_wrapper.c
src/compression_wrapper.h