From b7b5256849788ee3a8dc8e25e6eff6da377bf982 Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Sun, 30 May 2021 14:17:27 +0000
Subject: [PATCH] (ext.c) fix use after free
Fix use after free
Found by Coverity
Coverity id #331812
Signed-off-by: Andreas Mohr <and@gmx.li>
---
src/filemanager/hotlist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/filemanager/hotlist.c b/src/filemanager/hotlist.c
index 0fac79465..9b66c4555 100644
a
|
b
|
load_group (struct hotlist *grp) |
1210 | 1210 | add2hotlist (mc_config_get_string (mc_global.main_config, group_section, *profile_keys, ""), |
1211 | 1211 | g_strdup (*profile_keys), HL_TYPE_GROUP, LISTBOX_APPEND_AT_END); |
1212 | 1212 | |
1213 | | g_free (group_section); |
1214 | 1213 | g_strfreev (keys); |
1215 | 1214 | |
1216 | 1215 | keys = mc_config_get_keys (mc_global.main_config, grp->directory, NULL); |
… |
… |
load_group (struct hotlist *grp) |
1219 | 1218 | add2hotlist (mc_config_get_string (mc_global.main_config, group_section, *profile_keys, ""), |
1220 | 1219 | g_strdup (*profile_keys), HL_TYPE_ENTRY, LISTBOX_APPEND_AT_END); |
1221 | 1220 | |
| 1221 | g_free (group_section); |
1222 | 1222 | g_strfreev (keys); |
1223 | 1223 | |
1224 | 1224 | for (current = grp->head; current; current = current->next) |