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

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