dtls: fix generated cert dtls agent leak
authorIlya Smelykh <ilya@videoexpertsgroup.com>
Thu, 25 Jul 2019 13:03:02 +0000 (20:03 +0700)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 10 Aug 2019 10:54:39 +0000 (11:54 +0100)
The generated certificate dtls agent was refed two times on the first call.

ext/dtls/gstdtlsdec.c

index e41914e..0918373 100644 (file)
@@ -600,10 +600,10 @@ get_agent_by_pem (const gchar * pem)
     } else {
       GST_DEBUG_OBJECT (generated_cert_agent,
           "using agent with generated cert");
+      g_object_ref (generated_cert_agent);
     }
 
     agent = generated_cert_agent;
-    g_object_ref (agent);
   } else {
     G_LOCK (agent_table);