From 1b01415c3b410588699648792be0a4d1c14d66d1 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Wed, 31 Jan 2024 15:22:37 +0000 Subject: [PATCH] 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: --- subprojects/gst-plugins-bad/ext/srtp/gstsrtpenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/gst-plugins-bad/ext/srtp/gstsrtpenc.c b/subprojects/gst-plugins-bad/ext/srtp/gstsrtpenc.c index 5e17f2ce6a..291d154a44 100644 --- a/subprojects/gst-plugins-bad/ext/srtp/gstsrtpenc.c +++ b/subprojects/gst-plugins-bad/ext/srtp/gstsrtpenc.c @@ -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; }