summaryrefslogtreecommitdiff
path: root/libarchive/archive_entry.c
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2016-12-06 15:58:03 +0100
committerJoerg Sonnenberger <joerg@bec.de>2016-12-06 15:58:03 +0100
commit72abdbb8ba51e926432de242f4df5cf632546dc9 (patch)
tree95764c8621b49dcf02215011b69d28f301478cdd /libarchive/archive_entry.c
parentd4d4f91251a084d036518afb8423350c48914bf1 (diff)
downloadlibarchive-72abdbb8ba51e926432de242f4df5cf632546dc9.tar.gz
Replace malloc + memset with calloc.
Diffstat (limited to 'libarchive/archive_entry.c')
-rw-r--r--libarchive/archive_entry.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libarchive/archive_entry.c b/libarchive/archive_entry.c
index 88ce3976..b05eb4d2 100644
--- a/libarchive/archive_entry.c
+++ b/libarchive/archive_entry.c
@@ -248,10 +248,9 @@ archive_entry_new2(struct archive *a)
{
struct archive_entry *entry;
- entry = (struct archive_entry *)malloc(sizeof(*entry));
+ entry = (struct archive_entry *)calloc(1, sizeof(*entry));
if (entry == NULL)
return (NULL);
- memset(entry, 0, sizeof(*entry));
entry->archive = a;
return (entry);
}