summaryrefslogtreecommitdiff
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
parent8b9fbc9337bd1b8c8889de7d139f8d6ee93a3de3 (diff)
downloadmate-control-center-e1d4af90d002d0409f5838e496ae4f944d7ca512.tar.bz2
mate-control-center-e1d4af90d002d0409f5838e496ae4f944d7ca512.tar.xz
don't leak memory
-rw-r--r--capplets/appearance/theme-installer.c2
-rw-r--r--libslab/app-shell.c6
-rw-r--r--libslab/system-tile.c8
3 files changed, 15 insertions, 1 deletions
diff --git a/capplets/appearance/theme-installer.c b/capplets/appearance/theme-installer.c
index 23c94f99..9630d98d 100644
--- a/capplets/appearance/theme-installer.c
+++ b/capplets/appearance/theme-installer.c
@@ -689,6 +689,8 @@ mate_theme_install (GFile *file,
return;
}
+ g_free (path);
+
base = g_file_get_basename (file);
if (g_str_has_suffix (base, ".tar.gz")
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);