webrtc: fix memory leak
authorSam Gigliotti <samgig@amazon.com>
Wed, 18 Jul 2018 13:26:17 +0000 (14:26 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 19 Jul 2018 13:30:55 +0000 (14:30 +0100)
When it parses SDP, it doesn't free the error object.

https://bugzilla.gnome.org/show_bug.cgi?id=796830

ext/webrtc/gstwebrtcbin.c

index 6c86748..4d7ed83 100644 (file)
@@ -2806,6 +2806,7 @@ _set_description_task (GstWebRTCBin * webrtc, struct set_description *sd)
 
   if (!validate_sdp (webrtc, sd->source, sd->sdp, &error)) {
     GST_ERROR_OBJECT (webrtc, "%s", error->message);
+    g_clear_error (&error);
     goto out;
   }