Remove extra check before mc_search free() call.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2010-11-04 16:35:47 +03:00
parent 4c0ba932a8
commit 4892044e71
4 changed files with 5 additions and 11 deletions

View File

@ -57,10 +57,7 @@ mc_fhl_array_free (mc_fhl_t * fhl)
g_free (mc_filter->fgcolor); g_free (mc_filter->fgcolor);
g_free (mc_filter->bgcolor); g_free (mc_filter->bgcolor);
mc_search_free (mc_filter->search_condition);
if (mc_filter->search_condition != NULL)
mc_search_free (mc_filter->search_condition);
g_free (mc_filter); g_free (mc_filter);
} }
g_ptr_array_free (fhl->filters, TRUE); g_ptr_array_free (fhl->filters, TRUE);

View File

@ -120,7 +120,7 @@ typedef struct mc_search_type_str_struct {
mc_search_t *mc_search_new (const gchar * original, gsize original_len); 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); gboolean mc_search_prepare (mc_search_t * mc_search);

View File

@ -154,7 +154,7 @@ mc_search_new (const gchar * original, gsize str_len)
void void
mc_search_free (mc_search_t * lc_mc_search) mc_search_free (mc_search_t * lc_mc_search)
{ {
if (!lc_mc_search) if (lc_mc_search == NULL)
return; return;
g_free (lc_mc_search->original); g_free (lc_mc_search->original);

View File

@ -1698,11 +1698,8 @@ edit_replace_cmd (WEdit * edit, int again)
g_free (saved1), saved1 = g_strdup (input1); g_free (saved1), saved1 = g_strdup (input1);
g_free (saved2), saved2 = g_strdup (input2); 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) if (!edit->search)