diff options
author | Monsta <[email protected]> | 2014-11-16 14:28:44 +0300 |
---|---|---|
committer | infirit <[email protected]> | 2014-11-28 09:20:42 +0100 |
commit | e1d4af90d002d0409f5838e496ae4f944d7ca512 (patch) | |
tree | 28b7813df43dd3ea3691b848059421f62268b0fd /libslab | |
parent | 8b9fbc9337bd1b8c8889de7d139f8d6ee93a3de3 (diff) | |
download | mate-control-center-e1d4af90d002d0409f5838e496ae4f944d7ca512.tar.bz2 mate-control-center-e1d4af90d002d0409f5838e496ae4f944d7ca512.tar.xz |
don't leak memory
Diffstat (limited to 'libslab')
-rw-r--r-- | libslab/app-shell.c | 6 | ||||
-rw-r--r-- | libslab/system-tile.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/libslab/app-shell.c b/libslab/app-shell.c index 19d98bf2..8a09ec08 100644 --- a/libslab/app-shell.c +++ b/libslab/app-shell.c @@ -1184,6 +1184,12 @@ generate_new_apps (AppShellData * app_data) { g_object_unref (file); g_warning ("Cant get vfs info for %s\n", uri); + if (new_apps_category) { + g_free (new_apps_category->category); + g_free (new_apps_category); + } + g_free (all_apps_file_name); + g_strfreev (all_apps_split); return; } filetime = (long) g_file_info_get_attribute_uint64 (info, 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); |