mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-24 04:02:06 +03:00
(panel_recursive_cd_to_parent): fix memory leak.
Found by Coverity. Coverity id #331846. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
b6a169cc24
commit
69b8927ec9
@ -4180,7 +4180,10 @@ panel_recursive_cd_to_parent (const vfs_path_t * vpath)
|
||||
/* check if path contains only '/' */
|
||||
panel_cwd_path = vfs_path_as_str (cwd_vpath);
|
||||
if (panel_cwd_path != NULL && IS_PATH_SEP (panel_cwd_path[0]) && panel_cwd_path[1] == '\0')
|
||||
{
|
||||
vfs_path_free (cwd_vpath, TRUE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
tmp_vpath = vfs_path_vtokens_get (cwd_vpath, 0, -1);
|
||||
vfs_path_free (cwd_vpath, TRUE);
|
||||
|
Loading…
Reference in New Issue
Block a user