dtlsdec: Fix memory leak, release previous pem

https://bugzilla.gnome.org/show_bug.cgi?id=749322
This commit is contained in:
Jose Antonio Santos Cadenas 2015-05-13 17:15:57 +02:00 committed by Sebastian Dröge
parent 2173f9f15d
commit 3c3d6e8828

View file

@ -443,6 +443,10 @@ on_peer_certificate_received (GstDtlsConnection * connection, gchar * pem,
GST_DEBUG_OBJECT (self, "Received peer certificate PEM: \n%s", pem);
if (self->peer_pem != NULL) {
g_free (self->peer_pem);
self->peer_pem = NULL;
}
self->peer_pem = g_strdup (pem);
ref = g_new (GWeakRef, 1);