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

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