diff options
author | kientzle <kientzle@FreeBSD.org> | 2007-04-15 04:42:52 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2007-04-15 04:42:52 +0000 |
commit | b97ee9aaff34a91a479ea0d68a9a7d52f8e2df2d (patch) | |
tree | 0b37efe743e8f449d5bbfc5467aa519c7fa35fad /lib/libarchive | |
parent | e790087db093ba1fab8af4aef9b2927ee222a76b (diff) | |
download | FreeBSD-src-b97ee9aaff34a91a479ea0d68a9a7d52f8e2df2d.zip FreeBSD-src-b97ee9aaff34a91a479ea0d68a9a7d52f8e2df2d.tar.gz |
Don't free a NULL pointer.
Diffstat (limited to 'lib/libarchive')
-rw-r--r-- | lib/libarchive/archive_write_set_compression_none.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libarchive/archive_write_set_compression_none.c b/lib/libarchive/archive_write_set_compression_none.c index ffb651d..b5093ce 100644 --- a/lib/libarchive/archive_write_set_compression_none.c +++ b/lib/libarchive/archive_write_set_compression_none.c @@ -238,7 +238,8 @@ archive_compressor_none_finish(struct archive_write *a) if (a->client_closer != NULL) ret2 = (a->client_closer)(&a->archive, a->client_data); - free(state->buffer); + if (state->buffer) + free(state->buffer); free(state); a->compression_data = NULL; |