mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-24 16:57:42 -04:00
cli-transaction: Do not double free transaction ops
The transaction ops are a g_autolist(FlatpakTransactionOperation) which
means the list gets freed automatically. Calling g_list_free_full
without clearing the variable to NULL results in a double-free.
Closes: https://github.com/flatpak/flatpak/issues/5763
Fixes: 6e3cc82a ("Fix memory leaks")
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
f1088e3013
commit
0450c16fdb
@@ -1467,10 +1467,7 @@ transaction_ready_pre_auth (FlatpakTransaction *transaction)
|
||||
ret = flatpak_yes_no_prompt (TRUE, _("Proceed with these changes to the %s?"), name);
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
g_list_free_full (ops, g_object_unref);
|
||||
return FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
g_print ("\n\n");
|
||||
|
||||
Reference in New Issue
Block a user