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 --- lib/sqfs/write_xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqfs/write_xattr.c') diff --git a/lib/sqfs/write_xattr.c b/lib/sqfs/write_xattr.c index 195de0d..7214ea7 100644 --- a/lib/sqfs/write_xattr.c +++ b/lib/sqfs/write_xattr.c @@ -152,7 +152,7 @@ static uint64_t *create_ool_locations_table(fstree_t *fs) uint64_t *table; size_t i; - table = malloc(sizeof(uint64_t) * fs->xattr_values.num_strings); + table = alloc_array(sizeof(uint64_t), fs->xattr_values.num_strings); if (table == NULL) { perror("allocating Xattr OOL locations table"); -- cgit v1.2.3