flatpak-dir: Fix a memory leak when installing a package

The path was clobbered make the g_autoptr no work

Signed-off-by: Hubert Figuière <hub@figuiere.net>
This commit is contained in:
Hubert Figuière
2024-05-12 17:37:54 -04:00
committed by Simon McVittie
parent 739065e432
commit 9d60df4d0c

View File

@@ -1952,6 +1952,8 @@ flatpak_ensure_system_user_cache_dir_location (GError **error)
(st_buf.st_mode & 0777) == 0755)
return g_file_new_for_path (path);
g_clear_pointer (&path, g_free);
path = g_strdup ("/var/tmp/flatpak-cache-XXXXXX");
if (g_mkdtemp_full (path, 0755) == NULL)