srtpenc: Fix potential leak

When attempting to process a buffer after the rtcp session was closed the output
buffer memory would remain referenced.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6029>
This commit is contained in:
Philippe Normand 2024-01-31 15:22:37 +00:00 committed by GStreamer Marge Bot
parent b684ce33b7
commit 1b01415c3b

View file

@ -1149,6 +1149,7 @@ gst_srtp_enc_process_buffer (GstSrtpEnc * filter, GstPad * pad,
if (filter->session == NULL) {
/* The rtcp session disappeared (element shutting down) */
GST_OBJECT_UNLOCK (filter);
gst_buffer_unmap (bufout, &mapout);
ret = GST_FLOW_FLUSHING;
goto fail;
}