summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-10-21 17:30:27 +0200
committerraveit65 <[email protected]>2023-05-07 17:07:51 +0200
commitf13479d193c89eb5a497e06ad16657ee6850f896 (patch)
tree846d6ed48404694ee4e86036fa143c83f20a45c8
parentdd2c22523987bff1d4bdc92a166441d2589e703f (diff)
downloadmate-control-center-f13479d193c89eb5a497e06ad16657ee6850f896.tar.bz2
mate-control-center-f13479d193c89eb5a497e06ad16657ee6850f896.tar.xz
appearance: fix memory leak
-rw-r--r--capplets/appearance/mate-wp-item.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/capplets/appearance/mate-wp-item.c b/capplets/appearance/mate-wp-item.c
index 766f1b7a..1b0566ff 100644
--- a/capplets/appearance/mate-wp-item.c
+++ b/capplets/appearance/mate-wp-item.c
@@ -190,6 +190,7 @@ void mate_wp_item_free (MateWPItem * item) {
g_free (item->name);
g_free (item->filename);
g_free (item->description);
+ g_free (item->artist);
if (item->pcolor != NULL)
gdk_rgba_free (item->pcolor);
@@ -276,7 +277,7 @@ void mate_wp_item_update_description (MateWPItem * item) {
if (!strcmp (item->filename, "(none)")) {
item->description = g_strdup (item->name);
} else {
- const gchar *description;
+ gchar *description;
gchar *size;
gchar *dirname = g_path_get_dirname (item->filename);
gchar *artist;
@@ -292,9 +293,9 @@ void mate_wp_item_update_description (MateWPItem * item) {
if (strcmp (item->fileinfo->mime_type, "application/xml") == 0)
{
if (mate_bg_changes_with_time (item->bg))
- description = _("Slide Show");
+ description = g_strdup (_("Slide Show"));
else if (item->width > 0 && item->height > 0)
- description = _("Image");
+ description = g_strdup (_("Image"));
}
else
description = g_content_type_get_description (item->fileinfo->mime_type);
@@ -344,5 +345,6 @@ void mate_wp_item_update_description (MateWPItem * item) {
g_free (size);
g_free (dirname);
g_free (artist);
+ g_free (description);
}
}