forked from AuroraMiddleware/gtk
print portal: Plug a memory leak
Pointed out by Christian Persch. Closes https://gitlab.gnome.org/GNOME/gtk/issues/1271
This commit is contained in:
parent
a01feae15b
commit
3c2aceba63
@ -378,7 +378,7 @@ prepare_print_response (GDBusConnection *connection,
|
||||
{
|
||||
PortalData *portal = data;
|
||||
guint32 response;
|
||||
GVariant *options;
|
||||
GVariant *options = NULL;
|
||||
|
||||
if (portal->response_signal_id != 0)
|
||||
{
|
||||
@ -427,6 +427,9 @@ prepare_print_response (GDBusConnection *connection,
|
||||
else
|
||||
portal->result = GTK_PRINT_OPERATION_RESULT_CANCEL;
|
||||
|
||||
if (options)
|
||||
g_variant_unref (options);
|
||||
|
||||
if (portal->loop)
|
||||
g_main_loop_quit (portal->loop);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user