mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Remove extra check before mc_search free() call.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
4c0ba932a8
commit
4892044e71
@ -57,10 +57,7 @@ mc_fhl_array_free (mc_fhl_t * fhl)
|
||||
|
||||
g_free (mc_filter->fgcolor);
|
||||
g_free (mc_filter->bgcolor);
|
||||
|
||||
if (mc_filter->search_condition != NULL)
|
||||
mc_search_free (mc_filter->search_condition);
|
||||
|
||||
mc_search_free (mc_filter->search_condition);
|
||||
g_free (mc_filter);
|
||||
}
|
||||
g_ptr_array_free (fhl->filters, TRUE);
|
||||
|
@ -120,7 +120,7 @@ typedef struct mc_search_type_str_struct {
|
||||
|
||||
mc_search_t *mc_search_new (const gchar * original, gsize original_len);
|
||||
|
||||
void mc_search_free (mc_search_t * mc_search);
|
||||
void mc_search_free (mc_search_t * lc_mc_search);
|
||||
|
||||
gboolean mc_search_prepare (mc_search_t * mc_search);
|
||||
|
||||
|
@ -154,7 +154,7 @@ mc_search_new (const gchar * original, gsize str_len)
|
||||
void
|
||||
mc_search_free (mc_search_t * lc_mc_search)
|
||||
{
|
||||
if (!lc_mc_search)
|
||||
if (lc_mc_search == NULL)
|
||||
return;
|
||||
|
||||
g_free (lc_mc_search->original);
|
||||
|
@ -1698,11 +1698,8 @@ edit_replace_cmd (WEdit * edit, int again)
|
||||
g_free (saved1), saved1 = g_strdup (input1);
|
||||
g_free (saved2), saved2 = g_strdup (input2);
|
||||
|
||||
if (edit->search)
|
||||
{
|
||||
mc_search_free (edit->search);
|
||||
edit->search = NULL;
|
||||
}
|
||||
mc_search_free (edit->search);
|
||||
edit->search = NULL;
|
||||
}
|
||||
|
||||
if (!edit->search)
|
||||
|
Loading…
Reference in New Issue
Block a user