diff options
author | kientzle <kientzle@FreeBSD.org> | 2008-08-10 02:06:28 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2008-08-10 02:06:28 +0000 |
commit | 58af11b81526af878c816be97daf317a54c691a5 (patch) | |
tree | e18941f54d0ceed797a9254e4a8e26e3dd4b8ba3 /lib/libarchive/archive_write_set_format_pax.c | |
parent | 38a03c756ca71eefaadb9fa9ceedf8787bf87fa1 (diff) | |
download | FreeBSD-src-58af11b81526af878c816be97daf317a54c691a5.zip FreeBSD-src-58af11b81526af878c816be97daf317a54c691a5.tar.gz |
MfP4: Joerg Sonnenberger's fixes to make 'ar' and 'pax' writers
robust against multiple calls to their destroy() functions.
Diffstat (limited to 'lib/libarchive/archive_write_set_format_pax.c')
-rw-r--r-- | lib/libarchive/archive_write_set_format_pax.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libarchive/archive_write_set_format_pax.c b/lib/libarchive/archive_write_set_format_pax.c index b40aec5..001e0a2 100644 --- a/lib/libarchive/archive_write_set_format_pax.c +++ b/lib/libarchive/archive_write_set_format_pax.c @@ -1200,6 +1200,9 @@ archive_write_pax_destroy(struct archive_write *a) struct pax *pax; pax = (struct pax *)a->format_data; + if (pax == NULL) + return (ARCHIVE_OK); + archive_string_free(&pax->pax_header); free(pax); a->format_data = NULL; |