mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-08 04:45: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:
parent
9c8e70088c
commit
5379907cf8
1 changed files with 4 additions and 2 deletions
|
@ -781,14 +781,16 @@ get_sim_ready_cb (MMModem *modem,
|
||||||
static void
|
static void
|
||||||
constructed (GObject *object)
|
constructed (GObject *object)
|
||||||
{
|
{
|
||||||
|
g_autoptr (MMModem) modem = NULL;
|
||||||
CallsMMOrigin *self = CALLS_MM_ORIGIN (object);
|
CallsMMOrigin *self = CALLS_MM_ORIGIN (object);
|
||||||
MmGdbusModemVoice *gdbus_voice;
|
MmGdbusModemVoice *gdbus_voice;
|
||||||
|
|
||||||
G_OBJECT_CLASS (calls_mm_origin_parent_class)->constructed (object);
|
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,
|
NULL,
|
||||||
(GAsyncReadyCallback) get_sim_ready_cb,
|
(GAsyncReadyCallback) get_sim_ready_cb,
|
||||||
self);
|
self);
|
||||||
|
|
Loading…
Reference in a new issue