From 50c79b8df93c45495e81c15aca65abde469f1565 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Sat, 26 Jan 2013 22:40:28 +0000 Subject: [PATCH] xfs_repair: Fix free of uninit ptr in xfs_acl_valid() error path This error path: xfs_acl_valid(xfs_acl_disk_t *daclp) { xfs_acl_t *aclp; ... if (daclp == NULL) goto acl_invalid; ... acl_invalid: free(aclp); attempts to free garbage; set it to NULL on init to make it safe. Signed-off-by: Eric Sandeen Reviewed-by: Mark Tinguely Signed-off-by: Mark Tinguely --- repair/attr_repair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repair/attr_repair.c b/repair/attr_repair.c index bab65b120..ec7f4a320 100644 --- a/repair/attr_repair.c +++ b/repair/attr_repair.c @@ -1004,7 +1004,7 @@ process_attributes( static int xfs_acl_valid(xfs_acl_disk_t *daclp) { - xfs_acl_t *aclp; + xfs_acl_t *aclp = NULL; xfs_acl_entry_t *entry, *e; int user = 0, group = 0, other = 0, mask = 0, mask_required = 0; int i, j; -- 2.47.2