rtpbin: fix leak of pad when a fec encoder and aux sender a created
authorMatthew Waters <matthew@centricular.com>
Thu, 21 Oct 2021 09:32:05 +0000 (20:32 +1100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 21 Oct 2021 13:46:03 +0000 (13:46 +0000)
The ghost sink pad retrieved by rtpbin from the aux sender was not freed
when there was a previous element (fec encoder) in the chain.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1222>

subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c

index 39596cc..01e8dff 100644 (file)
@@ -4842,6 +4842,7 @@ create_send_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
       if (ret != GST_PAD_LINK_OK) {
         goto aux_link_failed;
       }
+      gst_object_unref (sinkpad);
     }
     prev = aux;
   } else {