Ticket #4179: mc-4179-cid-dir.c-fix-resource-leak.patch

File mc-4179-cid-dir.c-fix-resource-leak.patch, 763 bytes (added by and, 12 months ago)
  • src/filemanager/dir.c

    From 2cbecafae56983f7421ad6475de940c2ff2582b5 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Mon, 24 May 2021 17:41:08 +0000
    Subject: [PATCH] (dir.c) fix resource leak
    
    Fix Resource leak
    
    Found by Coverity
    Coverity id #331809
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/filemanager/dir.c | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/src/filemanager/dir.c b/src/filemanager/dir.c
    index ffc6b656b..4795a6d92 100644
    a b dir_list_reload (dir_list * list, const vfs_path_t * vpath, GCompareFunc sort, 
    756756        if (!dir_list_init (list)) 
    757757        { 
    758758            dir_list_free_list (&dir_copy); 
     759            mc_closedir (dirp); 
    759760            return FALSE; 
    760761        } 
    761762