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/6048>
This commit is contained in:
Philippe Normand 2024-01-31 15:22:37 +00:00 committed by Tim-Philipp Müller
parent 3593bf7b99
commit 9eb83a666e

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;
}