diff options
author | Jose Antonio Santos Cadenas <santoscadenas@gmail.com> | 2015-05-13 17:15:57 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-05-13 19:12:51 +0300 |
commit | 3c3d6e882813415c1daaf9f331ae2012c41b2e36 (patch) | |
tree | 83f76b501bdc698cd9cd9c229887708fa890ea58 /ext/dtls | |
parent | 2173f9f15dfbae3f7cd3425f6428c4a5418e3094 (diff) |
dtlsdec: Fix memory leak, release previous pem
https://bugzilla.gnome.org/show_bug.cgi?id=749322
Diffstat (limited to 'ext/dtls')
-rw-r--r-- | ext/dtls/gstdtlsdec.c | 4 |
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); |