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