summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-panel/launcher.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mate-panel/launcher.c b/mate-panel/launcher.c
index 03d7143d..7215c357 100644
--- a/mate-panel/launcher.c
+++ b/mate-panel/launcher.c
@@ -665,7 +665,6 @@ panel_launcher_find_writable_uri (const char *launcher_location,
{
char *path;
char *uri;
- char *filename;
if (!launcher_location)
return panel_make_unique_desktop_uri (NULL, source);
@@ -677,8 +676,9 @@ panel_launcher_find_writable_uri (const char *launcher_location,
return uri;
}
- filename = panel_launcher_get_filename (launcher_location);
+ char *filename = panel_launcher_get_filename (launcher_location);
if (filename != NULL) {
+ g_free (filename);
/* we have a file in the user directory. We either have a path
* or an URI */
if (g_path_is_absolute (launcher_location))
@@ -688,8 +688,6 @@ panel_launcher_find_writable_uri (const char *launcher_location,
return g_strdup (launcher_location);
}
- g_free (filename);
-
return panel_make_unique_desktop_uri (NULL, source);
}