diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2018-06-11 18:09:49 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2018-06-11 18:09:49 +0200 |
commit | 6169d3d14fdb10b3b2537ebfd29d7f2d10965b2a (patch) | |
tree | 99420cec3e78ebabf712b80d3a46667429838d03 | |
parent | a6101a85323fb366cc95fb6e16bd0d991de1e866 (diff) | |
download | ModemManager-6169d3d14fdb10b3b2537ebfd29d7f2d10965b2a.tar.gz |
iface-modem-voice: plug memleak when creating new incoming call
The mm_call_list_add_call() takes a full reference to the call, so we
can unref the original one safely.
-rw-r--r-- | src/mm-iface-modem-voice.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mm-iface-modem-voice.c b/src/mm-iface-modem-voice.c index 73fb314a7..23c3ba6ae 100644 --- a/src/mm-iface-modem-voice.c +++ b/src/mm-iface-modem-voice.c @@ -60,7 +60,7 @@ mm_iface_modem_voice_create_incoming_call (MMIfaceModemVoice *self) call = mm_call_list_get_new_incoming (list); if (!call) { - mm_dbg("Incoming call does not exist; create it"); + mm_dbg ("Creating new incoming call..."); call = mm_base_call_new (MM_BASE_MODEM (self)); g_object_set (call, @@ -71,10 +71,8 @@ mm_iface_modem_voice_create_incoming_call (MMIfaceModemVoice *self) /* Only export once properly created */ mm_base_call_export (call); - mm_dbg ("New call exported to DBus"); - mm_call_list_add_call (list, call); - mm_dbg ("Call added to the list"); + g_object_unref (call); } g_object_unref (list); |