Blame SOURCES/0001-accel-config-clean-up-double-frees-in-add_group.patch

5c4e19
From a073b40ea293dec87af5f887bb90744ed244e0c9 Mon Sep 17 00:00:00 2001
5c4e19
From: Jerry Snitselaar <jsnitsel@redhat.com>
5c4e19
Date: Mon, 18 Oct 2021 15:10:00 -0700
5c4e19
Subject: [PATCH 1/3] accel-config: clean up double frees in add_group
5c4e19
5c4e19
free(group) is called after jumping to the err_group label,
5c4e19
so don't call free(group) in paths jumping there.
5c4e19
5c4e19
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
5c4e19
---
5c4e19
 accfg/lib/libaccfg.c | 2 --
5c4e19
 1 file changed, 2 deletions(-)
5c4e19
5c4e19
diff --git a/accfg/lib/libaccfg.c b/accfg/lib/libaccfg.c
5c4e19
index f4fc17e5ca93..a13be34a7ef5 100644
5c4e19
--- a/accfg/lib/libaccfg.c
5c4e19
+++ b/accfg/lib/libaccfg.c
5c4e19
@@ -870,13 +870,11 @@ static void *add_group(void *parent, int id, const char *group_base,
5c4e19
 	group_base_string = strdup(group_base);
5c4e19
 	if (!group_base_string) {
5c4e19
 		err(ctx, "conversion of group_base_string failed\n");
5c4e19
-		free(group);
5c4e19
 		close(dfd);
5c4e19
 		goto err_group;
5c4e19
 	}
5c4e19
 	if (sscanf(basename(group_base_string),
5c4e19
 				"group%" SCNu64 ".%" SCNu64, &device_id, &group_id) != 2) {
5c4e19
-		free(group);
5c4e19
 		close(dfd);
5c4e19
 		goto err_group;
5c4e19
 	}
5c4e19
-- 
5c4e19
2.33.0
5c4e19