From 8a230fc5b5ed37c5c3a8c2b2d9bf03e4bc21ea48 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Mon, 21 Jun 2021 13:06:09 +0200 Subject: [PATCH] sip: origin: No need to explicitly clear nua handles Memory allocations from su_home_t will get cleaned up, when the home is freed. --- plugins/sip/calls-sip-origin.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/sip/calls-sip-origin.c b/plugins/sip/calls-sip-origin.c index 67c95b6..847317b 100644 --- a/plugins/sip/calls-sip-origin.c +++ b/plugins/sip/calls-sip-origin.c @@ -1158,13 +1158,8 @@ calls_sip_origin_dispose (GObject *object) remove_calls (self, NULL); - if (self->oper) { - g_clear_pointer (&self->oper->call_handle, nua_handle_unref); - g_clear_pointer (&self->oper->register_handle, nua_handle_unref); - - if (!self->use_direct_connection && self->state != CALLS_ACCOUNT_OFFLINE) - go_online (CALLS_ACCOUNT (self), FALSE); - } + if (!self->use_direct_connection && self->state == CALLS_ACCOUNT_ONLINE) + go_online (CALLS_ACCOUNT (self), FALSE); if (self->nua) { g_debug ("Requesting nua_shutdown ()");