summaryrefslogtreecommitdiff
path: root/mate-screenshot
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-11-08 15:26:58 +0100
committerRobert Antoni Buj Gelonch <[email protected]>2021-12-21 13:31:05 +0100
commitd8524845d09311f0b037eb7b8e13c45724bb1661 (patch)
tree5a263cb43aff3c7f75506057072bfa4a4581c7dd /mate-screenshot
parent95f36a96354422e55b5519e0bbcc7df04432dab2 (diff)
downloadmate-utils-d8524845d09311f0b037eb7b8e13c45724bb1661.tar.bz2
mate-utils-d8524845d09311f0b037eb7b8e13c45724bb1661.tar.xz
mate-screenshot: fix memory leak
Diffstat (limited to 'mate-screenshot')
-rw-r--r--mate-screenshot/src/mate-screenshot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mate-screenshot/src/mate-screenshot.c b/mate-screenshot/src/mate-screenshot.c
index 2c2449c2..43f74399 100644
--- a/mate-screenshot/src/mate-screenshot.c
+++ b/mate-screenshot/src/mate-screenshot.c
@@ -1178,8 +1178,10 @@ load_options (void)
/* Find various dirs */
last_save_dir = g_settings_get_string (settings,
LAST_SAVE_DIRECTORY_KEY);
- if (!last_save_dir || !last_save_dir[0])
+
+ if (*last_save_dir == '\0')
{
+ g_free (last_save_dir);
last_save_dir = get_desktop_dir ();
}
else if (last_save_dir[0] == '~')