diff options
author | kientzle <kientzle@FreeBSD.org> | 2010-01-23 07:52:44 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2010-01-23 07:52:44 +0000 |
commit | 164ec789c7d4a9e86f802c8f3bfaa46ddb4f0813 (patch) | |
tree | 28d4c9ccc7b6c7105d617685e8df396ed9b211ca /lib/libarchive | |
parent | 643a6f51c1d7cff9b6d3e3c3411c9344a8eab43e (diff) | |
download | FreeBSD-src-164ec789c7d4a9e86f802c8f3bfaa46ddb4f0813.zip FreeBSD-src-164ec789c7d4a9e86f802c8f3bfaa46ddb4f0813.tar.gz |
Initialize the allocated 'struct zip'.
Diffstat (limited to 'lib/libarchive')
-rw-r--r-- | lib/libarchive/archive_write_set_format_zip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libarchive/archive_write_set_format_zip.c b/lib/libarchive/archive_write_set_format_zip.c index 877ae09..d4d4f87 100644 --- a/lib/libarchive/archive_write_set_format_zip.c +++ b/lib/libarchive/archive_write_set_format_zip.c @@ -231,7 +231,7 @@ archive_write_set_format_zip(struct archive *_a) if (a->format_destroy != NULL) (a->format_destroy)(a); - zip = (struct zip *) malloc(sizeof(*zip)); + zip = (struct zip *) calloc(1, sizeof(*zip)); if (zip == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't allocate zip data"); return (ARCHIVE_FATAL); |