Ticket #4179: mc-4179-cid-hotlist.c-fix-use-after-free.patch

File mc-4179-cid-hotlist.c-fix-use-after-free.patch, 1.3 KB (added by and, 12 months ago)
  • src/filemanager/hotlist.c

    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) 
    12101210        add2hotlist (mc_config_get_string (mc_global.main_config, group_section, *profile_keys, ""), 
    12111211                     g_strdup (*profile_keys), HL_TYPE_GROUP, LISTBOX_APPEND_AT_END); 
    12121212 
    1213     g_free (group_section); 
    12141213    g_strfreev (keys); 
    12151214 
    12161215    keys = mc_config_get_keys (mc_global.main_config, grp->directory, NULL); 
    load_group (struct hotlist *grp) 
    12191218        add2hotlist (mc_config_get_string (mc_global.main_config, group_section, *profile_keys, ""), 
    12201219                     g_strdup (*profile_keys), HL_TYPE_ENTRY, LISTBOX_APPEND_AT_END); 
    12211220 
     1221    g_free (group_section); 
    12221222    g_strfreev (keys); 
    12231223 
    12241224    for (current = grp->head; current; current = current->next)