dtlsenc: Fix memory leak releasing connection_id
authorJose Antonio Santos Cadenas <santoscadenas@gmail.com>
Wed, 13 May 2015 13:59:48 +0000 (15:59 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 13 May 2015 16:14:34 +0000 (19:14 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=749318

ext/dtls/gstdtlsenc.c

index 08b6444..96dfa54 100644 (file)
@@ -209,6 +209,11 @@ gst_dtls_enc_finalize (GObject * object)
     self->encoder_key = NULL;
   }
 
+  if (self->connection_id) {
+    g_free (self->connection_id);
+    self->connection_id = NULL;
+  }
+
   g_mutex_lock (&self->queue_lock);
   g_queue_foreach (&self->queue, (GFunc) gst_buffer_unref, NULL);
   g_queue_clear (&self->queue);