Date: Tue, 3 Mar 2009 03:33:25 +0000 (UTC) From: Tim Kientzle <kientzle@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r189294 - head/lib/libarchive Message-ID: <200903030333.n233XPBi094109@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kientzle Date: Tue Mar 3 03:33:25 2009 New Revision: 189294 URL: http://svn.freebsd.org/changeset/base/189294 Log: Merge r282 from libarchive.googlecode.com: Close multiple filters by walking the filter list in archive_read_close(). Modified: head/lib/libarchive/archive_read.c head/lib/libarchive/archive_read_support_compression_compress.c Modified: head/lib/libarchive/archive_read.c ============================================================================== --- head/lib/libarchive/archive_read.c Tue Mar 3 03:28:09 2009 (r189293) +++ head/lib/libarchive/archive_read.c Tue Mar 3 03:33:25 2009 (r189294) @@ -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. */ Modified: head/lib/libarchive/archive_read_support_compression_compress.c ============================================================================== --- head/lib/libarchive/archive_read_support_compression_compress.c Tue Mar 3 03:28:09 2009 (r189293) +++ head/lib/libarchive/archive_read_support_compression_compress.c Tue Mar 3 03:33:25 2009 (r189294) @@ -339,7 +339,6 @@ compress_source_close(struct archive_rea { struct private_data *state = (struct private_data *)self->data; - self->upstream->close(self->upstream); free(state->out_block); free(state); free(self);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903030333.n233XPBi094109>