Remove a few more guards for frees
This commit is contained in:
parent
b10a017446
commit
cd4206764e
@ -571,8 +571,7 @@ handle_preference_init_string (void)
|
|||||||
if (!cursor->target)
|
if (!cursor->target)
|
||||||
meta_bug ("%s must have handler or target\n", cursor->base.key);
|
meta_bug ("%s must have handler or target\n", cursor->base.key);
|
||||||
|
|
||||||
if (*(cursor->target))
|
g_free (*(cursor->target));
|
||||||
g_free (*(cursor->target));
|
|
||||||
|
|
||||||
value = g_settings_get_string (SETTINGS (cursor->base.schema),
|
value = g_settings_get_string (SETTINGS (cursor->base.schema),
|
||||||
cursor->base.key);
|
cursor->base.key);
|
||||||
@ -728,8 +727,7 @@ handle_preference_update_string (GSettings *settings,
|
|||||||
|
|
||||||
inform_listeners = (g_strcmp0 (value, *(cursor->target)) != 0);
|
inform_listeners = (g_strcmp0 (value, *(cursor->target)) != 0);
|
||||||
|
|
||||||
if (*(cursor->target))
|
g_free(*(cursor->target));
|
||||||
g_free(*(cursor->target));
|
|
||||||
|
|
||||||
*(cursor->target) = value;
|
*(cursor->target) = value;
|
||||||
}
|
}
|
||||||
@ -1391,9 +1389,7 @@ theme_name_handler (GVariant *value,
|
|||||||
|
|
||||||
if (g_strcmp0 (current_theme, string_value) != 0)
|
if (g_strcmp0 (current_theme, string_value) != 0)
|
||||||
{
|
{
|
||||||
if (current_theme)
|
g_free (current_theme);
|
||||||
g_free (current_theme);
|
|
||||||
|
|
||||||
current_theme = g_strdup (string_value);
|
current_theme = g_strdup (string_value);
|
||||||
queue_changed (META_PREF_THEME);
|
queue_changed (META_PREF_THEME);
|
||||||
}
|
}
|
||||||
|
@ -835,8 +835,7 @@ meta_screen_free (MetaScreen *screen,
|
|||||||
if (screen->check_fullscreen_later != 0)
|
if (screen->check_fullscreen_later != 0)
|
||||||
meta_later_remove (screen->check_fullscreen_later);
|
meta_later_remove (screen->check_fullscreen_later);
|
||||||
|
|
||||||
if (screen->monitor_infos)
|
g_free (screen->monitor_infos);
|
||||||
g_free (screen->monitor_infos);
|
|
||||||
|
|
||||||
if (screen->tile_preview_timeout_id)
|
if (screen->tile_preview_timeout_id)
|
||||||
g_source_remove (screen->tile_preview_timeout_id);
|
g_source_remove (screen->tile_preview_timeout_id);
|
||||||
|
@ -330,8 +330,7 @@ test_client_do (TestClient *client,
|
|||||||
|
|
||||||
out:
|
out:
|
||||||
g_string_free (command, TRUE);
|
g_string_free (command, TRUE);
|
||||||
if (line)
|
g_free (line);
|
||||||
g_free (line);
|
|
||||||
|
|
||||||
return *error == NULL;
|
return *error == NULL;
|
||||||
}
|
}
|
||||||
|
@ -609,8 +609,7 @@ meta_frames_unmanage_window (MetaFrames *frames,
|
|||||||
if (frame->layout)
|
if (frame->layout)
|
||||||
g_object_unref (G_OBJECT (frame->layout));
|
g_object_unref (G_OBJECT (frame->layout));
|
||||||
|
|
||||||
if (frame->title)
|
g_free (frame->title);
|
||||||
g_free (frame->title);
|
|
||||||
|
|
||||||
g_free (frame);
|
g_free (frame);
|
||||||
}
|
}
|
||||||
|
@ -1117,8 +1117,7 @@ meta_color_spec_free (MetaColorSpec *spec)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case META_COLOR_SPEC_GTK_CUSTOM:
|
case META_COLOR_SPEC_GTK_CUSTOM:
|
||||||
if (spec->data.gtkcustom.color_name)
|
g_free (spec->data.gtkcustom.color_name);
|
||||||
g_free (spec->data.gtkcustom.color_name);
|
|
||||||
if (spec->data.gtkcustom.fallback)
|
if (spec->data.gtkcustom.fallback)
|
||||||
meta_color_spec_free (spec->data.gtkcustom.fallback);
|
meta_color_spec_free (spec->data.gtkcustom.fallback);
|
||||||
DEBUG_FILL_STRUCT (&spec->data.gtkcustom);
|
DEBUG_FILL_STRUCT (&spec->data.gtkcustom);
|
||||||
@ -2956,9 +2955,7 @@ meta_draw_op_free (MetaDrawOp *op)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case META_DRAW_RECTANGLE:
|
case META_DRAW_RECTANGLE:
|
||||||
if (op->data.rectangle.color_spec)
|
g_free (op->data.rectangle.color_spec);
|
||||||
g_free (op->data.rectangle.color_spec);
|
|
||||||
|
|
||||||
meta_draw_spec_free (op->data.rectangle.x);
|
meta_draw_spec_free (op->data.rectangle.x);
|
||||||
meta_draw_spec_free (op->data.rectangle.y);
|
meta_draw_spec_free (op->data.rectangle.y);
|
||||||
meta_draw_spec_free (op->data.rectangle.width);
|
meta_draw_spec_free (op->data.rectangle.width);
|
||||||
@ -2966,9 +2963,7 @@ meta_draw_op_free (MetaDrawOp *op)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case META_DRAW_ARC:
|
case META_DRAW_ARC:
|
||||||
if (op->data.arc.color_spec)
|
g_free (op->data.arc.color_spec);
|
||||||
g_free (op->data.arc.color_spec);
|
|
||||||
|
|
||||||
meta_draw_spec_free (op->data.arc.x);
|
meta_draw_spec_free (op->data.arc.x);
|
||||||
meta_draw_spec_free (op->data.arc.y);
|
meta_draw_spec_free (op->data.arc.y);
|
||||||
meta_draw_spec_free (op->data.arc.width);
|
meta_draw_spec_free (op->data.arc.width);
|
||||||
|
Loading…
Reference in New Issue
Block a user