summaryrefslogtreecommitdiff
path: root/mate-panel
diff options
context:
space:
mode:
authorMonsta <[email protected]>2014-11-06 13:26:30 +0300
committerMonsta <[email protected]>2014-11-23 23:21:35 +0300
commitd37ec4b473b4191f871a02fbb04d915a222ae5ba (patch)
treec1e1419b29bed10dd1dcd405787d0b5f3c4ee35e /mate-panel
parent9bdf26a667fdb91c2aaa326b946e058677d97a0d (diff)
downloadmate-panel-d37ec4b473b4191f871a02fbb04d915a222ae5ba.tar.bz2
mate-panel-d37ec4b473b4191f871a02fbb04d915a222ae5ba.tar.xz
don't leak memory
Diffstat (limited to 'mate-panel')
-rw-r--r--mate-panel/launcher.c2
-rw-r--r--mate-panel/libpanel-util/panel-icon-chooser.c1
-rw-r--r--mate-panel/menu.c1
-rw-r--r--mate-panel/panel-run-dialog.c2
-rw-r--r--mate-panel/panel-test-applets.c1
-rw-r--r--mate-panel/panel-util.c1
6 files changed, 6 insertions, 2 deletions
diff --git a/mate-panel/launcher.c b/mate-panel/launcher.c
index d569e757..4928fa34 100644
--- a/mate-panel/launcher.c
+++ b/mate-panel/launcher.c
@@ -466,7 +466,7 @@ create_launcher (const char *location)
g_error_free (error);
g_key_file_free (key_file);
-
+ g_free (new_location);
return NULL; /*button is null*/
}
diff --git a/mate-panel/libpanel-util/panel-icon-chooser.c b/mate-panel/libpanel-util/panel-icon-chooser.c
index a24d425e..6772019c 100644
--- a/mate-panel/libpanel-util/panel-icon-chooser.c
+++ b/mate-panel/libpanel-util/panel-icon-chooser.c
@@ -459,6 +459,7 @@ _panel_icon_chooser_clicked (GtkButton *button)
path = g_build_filename (DATADIR, "icons", NULL);
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filechooser),
path);
+ g_free (path);
}
gtk_window_set_destroy_with_parent (GTK_WINDOW (filechooser), TRUE);
diff --git a/mate-panel/menu.c b/mate-panel/menu.c
index c9e0bcf6..462a3293 100644
--- a/mate-panel/menu.c
+++ b/mate-panel/menu.c
@@ -801,6 +801,7 @@ menu_escape_underscores_and_prepend (const char *text)
if (c == (gunichar)-1) {
g_warning ("Invalid input string for underscore escaping");
+ g_string_free (escaped_text, TRUE);
return g_strdup (text);
} else if (c == '_') {
g_string_insert_c (escaped_text,
diff --git a/mate-panel/panel-run-dialog.c b/mate-panel/panel-run-dialog.c
index 0e9068f8..9da6ce03 100644
--- a/mate-panel/panel-run-dialog.c
+++ b/mate-panel/panel-run-dialog.c
@@ -622,13 +622,13 @@ fuzzy_command_match (const char *cmd1,
/* same for the user command */
tokens = g_strsplit (cmd2, " ", -1);
- word2 = g_path_get_basename (tokens [0]);
if (!tokens || !tokens [0]) {
g_free (word1);
g_strfreev (tokens);
return FALSE;
}
+ word2 = g_path_get_basename (tokens [0]);
g_strfreev (tokens);
if (!strcmp (word1, word2)) {
diff --git a/mate-panel/panel-test-applets.c b/mate-panel/panel-test-applets.c
index 152a65ea..aa83bbbe 100644
--- a/mate-panel/panel-test-applets.c
+++ b/mate-panel/panel-test-applets.c
@@ -309,6 +309,7 @@ setup_options (void)
for (i = 0; !unique_key_found; i++)
{
+ g_free (unique_key);
unique_key = g_strdup_printf ("mate-panel-test-applet-%d", i);
unique_key_found = TRUE;
dconf_paths = mate_dconf_list_subdirs ("/tmp/", TRUE);
diff --git a/mate-panel/panel-util.c b/mate-panel/panel-util.c
index f3ab7bc7..b9af4675 100644
--- a/mate-panel/panel-util.c
+++ b/mate-panel/panel-util.c
@@ -790,6 +790,7 @@ guess_icon_from_exec (GtkIconTheme *icon_theme,
return NULL;
}
+ g_free (path);
return icon_name;
}