Merge r282 from libarchive.googlecode.com: Close multiple filters

by walking the filter list in archive_read_close().
This commit is contained in:
Tim Kientzle 2009-03-03 03:33:25 +00:00
parent 80bb6bf259
commit bc14277c79
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=189294
2 changed files with 3 additions and 3 deletions

View file

@ -595,11 +595,12 @@ archive_read_close(struct archive *_a)
/* TODO: Clean up the formatters. */
/* Clean up the stream pipeline. */
if (a->source != NULL) {
while (a->source != NULL) {
struct archive_read_source *t = a->source->upstream;
r1 = (a->source->close)(a->source);
if (r1 < r)
r = r1;
a->source = NULL;
a->source = t;
}
/* Release the reader objects. */

View file

@ -339,7 +339,6 @@ compress_source_close(struct archive_read_source *self)
{
struct private_data *state = (struct private_data *)self->data;
self->upstream->close(self->upstream);
free(state->out_block);
free(state);
free(self);