1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2025-01-07 12:25:31 +00:00

mm-origin: Don't leak MMModem

mm_object_get_modem() is transfer full,
so we need to unref it when we're done.
This commit is contained in:
Evangelos Ribeiro Tzaras 2023-01-18 21:14:46 +01:00
parent 9c8e70088c
commit 5379907cf8

View file

@ -781,14 +781,16 @@ get_sim_ready_cb (MMModem *modem,
static void
constructed (GObject *object)
{
g_autoptr (MMModem) modem = NULL;
CallsMMOrigin *self = CALLS_MM_ORIGIN (object);
MmGdbusModemVoice *gdbus_voice;
G_OBJECT_CLASS (calls_mm_origin_parent_class)->constructed (object);
self->name = modem_get_name (mm_object_get_modem (self->mm_obj));
modem = mm_object_get_modem (self->mm_obj);
self->name = modem_get_name (modem);
mm_modem_get_sim (mm_object_get_modem (self->mm_obj),
mm_modem_get_sim (modem,
NULL,
(GAsyncReadyCallback) get_sim_ready_cb,
self);