(do_panelize_cd): fix memory leak.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2021-03-18 16:41:36 +03:00
parent 11ed948f02
commit 3ba4229508

View File

@ -469,7 +469,8 @@ do_panelize_cd (WPanel * panel)
tmp_vpath = tmp_vpath =
vfs_path_append_new (panelized_panel.root_vpath, vfs_path_append_new (panelized_panel.root_vpath,
panelized_panel.list.list[i].fname->str, (char *) NULL); panelized_panel.list.list[i].fname->str, (char *) NULL);
list->list[i].fname = g_string_new (vfs_path_free (tmp_vpath, FALSE)); list->list[i].fname = g_string_new (vfs_path_as_str (tmp_vpath));
vfs_path_free (tmp_vpath, TRUE);
} }
list->list[i].f.link_to_dir = panelized_panel.list.list[i].f.link_to_dir; list->list[i].f.link_to_dir = panelized_panel.list.list[i].f.link_to_dir;
list->list[i].f.stale_link = panelized_panel.list.list[i].f.stale_link; list->list[i].f.stale_link = panelized_panel.list.list[i].f.stale_link;