From 7c028e224978e1d5a4f207cc42b9eb58d81897dd Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 23 Aug 2019 01:33:50 +0200 Subject: 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 --- tar/sqfs2tar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tar/sqfs2tar.c') 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; -- cgit v1.2.3