summaryrefslogtreecommitdiff
path: root/ext/dtls
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dtls')
-rw-r--r--ext/dtls/gstdtlsdec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/dtls/gstdtlsdec.c b/ext/dtls/gstdtlsdec.c
index 9e7d84798..75c827527 100644
--- a/ext/dtls/gstdtlsdec.c
+++ b/ext/dtls/gstdtlsdec.c
@@ -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);