[calls/gnome-41] sip: origin: Fix memory leak



commit 2227e994662a979624b4a5a576c637d0f14c2fe4
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date:   Fri Sep 17 16:56:47 2021 +0200

    sip: origin: Fix memory leak
    
    (cherry picked from commit 400281c07e01f449107384212d1468ded6fcebe1)

 plugins/sip/calls-sip-call.c   | 2 +-
 plugins/sip/calls-sip-origin.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/sip/calls-sip-call.c b/plugins/sip/calls-sip-call.c
index 268bcd49..6e0023b9 100644
--- a/plugins/sip/calls-sip-call.c
+++ b/plugins/sip/calls-sip-call.c
@@ -462,5 +462,5 @@ calls_sip_call_set_codecs (CallsSipCall *self,
   g_return_if_fail (codecs);
 
   g_list_free (self->codecs);
-  self->codecs = codecs;
+  self->codecs = g_list_copy (codecs);
 }
diff --git a/plugins/sip/calls-sip-origin.c b/plugins/sip/calls-sip-origin.c
index ba9d7e17..e628b593 100644
--- a/plugins/sip/calls-sip-origin.c
+++ b/plugins/sip/calls-sip-origin.c
@@ -518,7 +518,7 @@ sip_i_state (int              status,
    * also: rtcp port = rtp port + 1
    */
   if (r_sdp) {
-    GList *codecs =
+    g_autoptr (GList) codecs =
       calls_sip_media_manager_get_codecs_from_sdp (origin->media_manager,
                                                    r_sdp->sdp_media);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]