summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-02-02 20:00:41 +0100
committermonsta <[email protected]>2020-02-17 13:28:23 +0300
commit320ade7446930095bd2504f2994f55e01f1e35ee (patch)
treec44aadebaef28497b6d6d961858d6a9cad666f52
parent6284c67053246a82bf785e2f7b8cac5de55de54f (diff)
downloadcaja-extensions-320ade7446930095bd2504f2994f55e01f1e35ee.tar.bz2
caja-extensions-320ade7446930095bd2504f2994f55e01f1e35ee.tar.xz
caja-wallpaper-extension: fix memory leak
-rw-r--r--wallpaper/caja-wallpaper-extension.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/wallpaper/caja-wallpaper-extension.c b/wallpaper/caja-wallpaper-extension.c
index bc3352f..2b364b3 100644
--- a/wallpaper/caja-wallpaper-extension.c
+++ b/wallpaper/caja-wallpaper-extension.c
@@ -66,15 +66,12 @@ set_wallpaper_callback (CajaMenuItem *item,
static gboolean
is_image (CajaFileInfo *file)
{
- gchar *mimeType;
+ gchar *mimeType;
gboolean isImage;
mimeType = caja_file_info_get_mime_type (file);
-
- isImage = g_str_has_prefix (caja_file_info_get_mime_type (file), "image/");
-
+ isImage = g_str_has_prefix (mimeType, "image/");
g_free (mimeType);
-
return isImage;
}