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

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