From 641a48703aedff02e9ce10ca5af2964459a92006 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Wed, 6 Jan 2010 01:04:23 -0500 Subject: [PATCH] Clear the allocated 'zip' structure by using calloc() instead of malloc(). SVN-Revision: 1807 --- libarchive/archive_write_set_format_zip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libarchive/archive_write_set_format_zip.c b/libarchive/archive_write_set_format_zip.c index f24928058..14cc6697d 100644 --- a/libarchive/archive_write_set_format_zip.c +++ b/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); -- 2.47.3