summaryrefslogtreecommitdiff
path: root/tar
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-23 01:33:50 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-23 02:09:51 +0200
commit7c028e224978e1d5a4f207cc42b9eb58d81897dd (patch)
treed7165e3b9d1a7041cd79712526ad472c21135bdc /tar
parent0a5383ccdf8e87d2259d02a9ff44420b3bc3f58d (diff)
Some simple search/replace cases for allocation
This commit exchanges some malloc(x + y * z) patterns that can be found with a simple git grep and are obvious for the new wrappers. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tar')
-rw-r--r--tar/sqfs2tar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tar/sqfs2tar.c b/tar/sqfs2tar.c
index 59e9703..fbdb016 100644
--- a/tar/sqfs2tar.c
+++ b/tar/sqfs2tar.c
@@ -187,7 +187,7 @@ static tar_xattr_t *gen_xattr_list(fstree_t *fs, tree_xattr_t *xattr)
tar_xattr_t *list;
size_t i;
- list = malloc(sizeof(list[0]) * xattr->num_attr);
+ list = alloc_array(sizeof(list[0]), xattr->num_attr);
if (list == NULL) {
perror("creating xattr list");
return NULL;