Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09 Matthias Clasen <mclasen@redhat.com> * Everywhere: Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder, Djihed Afifi) * configure.in: Check for ftw.h svn path=/trunk/; revision=17444
This commit is contained in:
committed by
Matthias Clasen
parent
a1e4554462
commit
82ce59cd0f
@ -375,8 +375,7 @@ theme_parse_detail(GScanner * scanner,
|
||||
if (token != G_TOKEN_STRING)
|
||||
return G_TOKEN_STRING;
|
||||
|
||||
if (data->match_data.detail)
|
||||
g_free (data->match_data.detail);
|
||||
g_free (data->match_data.detail);
|
||||
|
||||
data->match_data.detail = g_strdup(scanner->value.v_string);
|
||||
|
||||
@ -622,8 +621,7 @@ theme_image_unref (ThemeImage *data)
|
||||
data->refcount--;
|
||||
if (data->refcount == 0)
|
||||
{
|
||||
if (data->match_data.detail)
|
||||
g_free (data->match_data.detail);
|
||||
g_free (data->match_data.detail);
|
||||
if (data->background)
|
||||
theme_pixbuf_destroy (data->background);
|
||||
if (data->overlay)
|
||||
|
||||
@ -487,8 +487,7 @@ theme_pixbuf_set_filename (ThemePixbuf *theme_pb,
|
||||
theme_pb->pixbuf = NULL;
|
||||
}
|
||||
|
||||
if (theme_pb->filename)
|
||||
g_free (theme_pb->filename);
|
||||
g_free (theme_pb->filename);
|
||||
|
||||
if (filename)
|
||||
theme_pb->filename = g_strdup (filename);
|
||||
|
||||
@ -1159,8 +1159,7 @@ preedit_draw_callback (XIC xic,
|
||||
|
||||
context->preedit_length += diff;
|
||||
|
||||
if (new_text)
|
||||
g_free (new_text);
|
||||
g_free (new_text);
|
||||
|
||||
if (!context->finalizing)
|
||||
g_signal_emit_by_name (context, "preedit_changed");
|
||||
|
||||
@ -613,8 +613,7 @@ cups_dispatch_watch_finalize (GSource *source)
|
||||
dispatch->backend = NULL;
|
||||
}
|
||||
|
||||
if (dispatch->data_poll != NULL)
|
||||
g_free (dispatch->data_poll);
|
||||
g_free (dispatch->data_poll);
|
||||
}
|
||||
|
||||
static GSourceFuncs _cups_dispatch_watch_funcs = {
|
||||
|
||||
Reference in New Issue
Block a user