Fixed memory leaks in viewer.
Free viewer resources before quit from viewer. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
родитель
63a4966a70
Коммит
69988b0395
@ -138,12 +138,8 @@ mcview_dialog_search (mcview_t * view)
|
||||
|
||||
g_free (view->last_search_string);
|
||||
view->last_search_string = exp;
|
||||
|
||||
if (view->search_nroff_seq != NULL)
|
||||
mcview_nroff_seq_free (&(view->search_nroff_seq));
|
||||
|
||||
if (view->search != NULL)
|
||||
mc_search_free (view->search);
|
||||
mcview_nroff_seq_free (&view->search_nroff_seq);
|
||||
mc_search_free (view->search);
|
||||
|
||||
view->search = mc_search_new (view->last_search_string, -1);
|
||||
view->search_nroff_seq = mcview_nroff_seq_new (view);
|
||||
|
@ -191,12 +191,20 @@ mcview_done (mcview_t * view)
|
||||
|
||||
coord_cache_free (view->coord_cache), view->coord_cache = NULL;
|
||||
|
||||
if (!(view->converter == INVALID_CONV || view->converter != str_cnv_from_term))
|
||||
if (view->converter == INVALID_CONV)
|
||||
view->converter = str_cnv_from_term;
|
||||
|
||||
if (view->converter != str_cnv_from_term)
|
||||
{
|
||||
str_close_conv (view->converter);
|
||||
view->converter = str_cnv_from_term;
|
||||
}
|
||||
|
||||
mc_search_free (view->search);
|
||||
view->search = NULL;
|
||||
g_free (view->last_search_string);
|
||||
view->last_search_string = NULL;
|
||||
mcview_nroff_seq_free (&view->search_nroff_seq);
|
||||
mcview_hexedit_free_change_list (view);
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user