summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-02-02 20:00:41 +0100
committerZenWalker <[email protected]>2020-02-03 10:57:59 +0100
commit370539f2f8ce300427653501c6d2190a22354bfb (patch)
treea13ad513db4026daccb347f4c35f4f26344fb1c7
parent506bcd56c87f237edd38f266af725a7da944439b (diff)
downloadcaja-extensions-370539f2f8ce300427653501c6d2190a22354bfb.tar.bz2
caja-extensions-370539f2f8ce300427653501c6d2190a22354bfb.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 f25f097..591eeb8 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;
}