mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
rtsp-sdp: Fix resource leak in mikey messsage
Fixed a resource leak for mikey message while adding crypto session failed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/144>
This commit is contained in:
parent
af290ae0e0
commit
e55515188d
1 changed files with 3 additions and 1 deletions
|
@ -280,8 +280,10 @@ gst_rtsp_sdp_make_media (GstSDPMessage * sdp, GstSDPInfo * info,
|
||||||
mikey_msg = gst_mikey_message_new_from_caps (caps);
|
mikey_msg = gst_mikey_message_new_from_caps (caps);
|
||||||
if (mikey_msg) {
|
if (mikey_msg) {
|
||||||
/* add policy '0' for all sending SSRC */
|
/* add policy '0' for all sending SSRC */
|
||||||
if (!mikey_add_crypto_sessions (stream, mikey_msg))
|
if (!mikey_add_crypto_sessions (stream, mikey_msg)) {
|
||||||
|
gst_mikey_message_unref (mikey_msg);
|
||||||
goto crypto_sessions_error;
|
goto crypto_sessions_error;
|
||||||
|
}
|
||||||
|
|
||||||
base64 = gst_mikey_message_base64_encode (mikey_msg);
|
base64 = gst_mikey_message_base64_encode (mikey_msg);
|
||||||
if (base64) {
|
if (base64) {
|
||||||
|
|
Loading…
Reference in a new issue