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

ext/dtls/gstdtlsenc.c

index 477af10..08b6444 100644 (file)
@@ -230,6 +230,10 @@ gst_dtls_enc_set_property (GObject * object, guint prop_id,
 
   switch (prop_id) {
     case PROP_CONNECTION_ID:
+      if (self->connection_id != NULL) {
+        g_free (self->connection_id);
+        self->connection_id = NULL;
+      }
       self->connection_id = g_value_dup_string (value);
       break;
     case PROP_IS_CLIENT: