summaryrefslogtreecommitdiff
path: root/libslab/system-tile.c
diff options
context:
space:
mode:
authorMonsta <[email protected]>2014-11-16 14:28:44 +0300
committerinfirit <[email protected]>2014-11-28 09:20:42 +0100
commite1d4af90d002d0409f5838e496ae4f944d7ca512 (patch)
tree28b7813df43dd3ea3691b848059421f62268b0fd /libslab/system-tile.c
parent8b9fbc9337bd1b8c8889de7d139f8d6ee93a3de3 (diff)
downloadmate-control-center-e1d4af90d002d0409f5838e496ae4f944d7ca512.tar.bz2
mate-control-center-e1d4af90d002d0409f5838e496ae4f944d7ca512.tar.xz
don't leak memory
Diffstat (limited to 'libslab/system-tile.c')
-rw-r--r--libslab/system-tile.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libslab/system-tile.c b/libslab/system-tile.c
index 995754ef..598e6aa7 100644
--- a/libslab/system-tile.c
+++ b/libslab/system-tile.c
@@ -93,8 +93,14 @@ system_tile_new (const gchar *desktop_item_id, const gchar *title)
mate_desktop_item_get_localestring (desktop_item, "Name"));
}
- if (! uri)
+ if (!uri) {
+ g_free (header_txt);
+ g_free (image_id);
+ if (desktop_item) {
+ mate_desktop_item_unref (desktop_item);
+ }
return NULL;
+ }
header = create_header (header_txt);