Skip to content

Commit

Permalink
Plug some small leaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
attente authored and Jonathan Matthew committed Feb 22, 2013
1 parent 4cec9fc commit f95589b
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/audioscrobbler/rb-audioscrobbler-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ impl_deactivate (PeasActivatable *bplugin)

if (plugin->lastfm_page != NULL) {
rb_display_page_delete_thyself (plugin->lastfm_page);
g_object_unref (plugin->lastfm_page);
plugin->lastfm_page = NULL;
}

Expand All @@ -158,6 +159,7 @@ impl_deactivate (PeasActivatable *bplugin)

if (plugin->librefm_page != NULL) {
rb_display_page_delete_thyself (plugin->librefm_page);
g_object_unref (plugin->librefm_page);
plugin->librefm_page = NULL;
}
}
Expand Down Expand Up @@ -223,6 +225,7 @@ lastfm_settings_changed_cb (GSettings *settings,
g_object_unref (lastfm);
} else if (enabled == FALSE && plugin->lastfm_page != NULL) {
rb_display_page_delete_thyself (plugin->lastfm_page);
g_object_unref (plugin->lastfm_page);
plugin->lastfm_page = NULL;
}
}
Expand Down Expand Up @@ -251,6 +254,7 @@ librefm_settings_changed_cb (GSettings *settings,
g_object_unref (shell);
} else if (enabled == FALSE && plugin->librefm_page != NULL) {
rb_display_page_delete_thyself (plugin->librefm_page);
g_object_unref (plugin->librefm_page);
plugin->librefm_page = NULL;
}
}
Expand Down
5 changes: 5 additions & 0 deletions plugins/brasero-disc-recorder/rb-disc-recorder-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,11 @@ impl_deactivate (PeasActivatable *plugin)
/* NOTE: don't deactivate libbrasero-media as it could be in use somewhere else */

g_object_unref (shell);

if (pi->action_group != NULL) {
g_object_unref (pi->action_group);
pi->action_group = NULL;
}
}

G_MODULE_EXPORT void
Expand Down
5 changes: 5 additions & 0 deletions plugins/dbus-media-server/rb-dbus-media-server-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -2492,6 +2492,11 @@ impl_deactivate (PeasActivatable *bplugin)
plugin->name_own_id = 0;
}

if (plugin->node_info != NULL) {
g_dbus_node_info_unref (plugin->node_info);
plugin->node_info = NULL;
}

if (plugin->connection != NULL) {
g_object_unref (plugin->connection);
plugin->connection = NULL;
Expand Down
1 change: 1 addition & 0 deletions plugins/iradio/rb-iradio-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ impl_deactivate (PeasActivatable *plugin)
g_object_unref (uimanager);

rb_display_page_delete_thyself (RB_DISPLAY_PAGE (pi->source));
g_object_unref (pi->source);
pi->source = NULL;

g_object_unref (shell);
Expand Down
5 changes: 5 additions & 0 deletions plugins/mpris/rb-mpris-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1617,6 +1617,11 @@ impl_deactivate (PeasActivatable *bplugin)
plugin->name_own_id = 0;
}

if (plugin->node_info != NULL) {
g_dbus_node_info_unref (plugin->node_info);
plugin->node_info = NULL;
}

if (plugin->connection != NULL) {
g_object_unref (plugin->connection);
plugin->connection = NULL;
Expand Down
1 change: 1 addition & 0 deletions widgets/rb-entry-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ rb_entry_view_finalize (GObject *object)
g_hash_table_destroy (view->priv->column_key_map);

g_free (view->priv->sorting_column_name);
g_strfreev (view->priv->visible_columns);

G_OBJECT_CLASS (rb_entry_view_parent_class)->finalize (object);
}
Expand Down
3 changes: 3 additions & 0 deletions widgets/rb-fading-image.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,13 +651,16 @@ composite_into_current (RBFadingImage *image)
cr = cairo_create (dest);
render_current (image, cr, width, height, FALSE);
render_next (image, cr, width, height, FALSE);
cairo_destroy (cr);

if (image->priv->current_pat != NULL) {
cairo_pattern_destroy (image->priv->current_pat);
}
image->priv->current_pat = cairo_pattern_create_for_surface (dest);
image->priv->current_width = width;
image->priv->current_height = height;

cairo_surface_destroy (dest);
}

/**
Expand Down

0 comments on commit f95589b

Please sign in to comment.