mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 08:22:16 +01:00 
			
		
		
		
	gdesktopappinfo: Unref GDBus call result GVariant if no callback is set
When launching URIs via dbus we may ignore the callback if one was not provided, however in such case we were also leaking the return value for the gdbus call. Unref it properly. Helps with: https://gitlab.gnome.org/GNOME/glib/-/issues/333
This commit is contained in:
		| @@ -3108,6 +3108,9 @@ launch_uris_with_dbus_signal_cb (GObject      *object, | ||||
|  | ||||
|   if (data->callback) | ||||
|     data->callback (object, result, data->user_data); | ||||
|   else if (!g_task_had_error (G_TASK (result))) | ||||
|     g_variant_unref (g_dbus_connection_call_finish (G_DBUS_CONNECTION (object), | ||||
|                                                     result, NULL)); | ||||
|  | ||||
|   launch_uris_with_dbus_data_free (data); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user