diff options
author | rbuj <[email protected]> | 2021-11-08 15:26:58 +0100 |
---|---|---|
committer | rbuj <[email protected]> | 2021-12-21 13:32:41 +0100 |
commit | 74646513584b8bcbea61b37ddb3e75a5a206605c (patch) | |
tree | 7a54f8ec7cd6ce4436b591a55bb892bfa7e48e50 | |
parent | fd6d44bb55aaeeae38d158adf7ce3f36dbb229be (diff) | |
download | mate-utils-74646513584b8bcbea61b37ddb3e75a5a206605c.tar.bz2 mate-utils-74646513584b8bcbea61b37ddb3e75a5a206605c.tar.xz |
mate-screenshot: fix memory leak
-rw-r--r-- | mate-screenshot/src/mate-screenshot.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mate-screenshot/src/mate-screenshot.c b/mate-screenshot/src/mate-screenshot.c index e88fc6c4..de959406 100644 --- a/mate-screenshot/src/mate-screenshot.c +++ b/mate-screenshot/src/mate-screenshot.c @@ -1180,8 +1180,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] == '~') |