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:
Sebastian Wick
2024-04-04 19:19:38 +02:00
committed by Georges Basile Stavracas Neto
parent f1088e3013
commit 0450c16fdb

View File

@@ -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");