rtsp-client: fix leak adding headers

gst_rtsp_message_add_header() makes a copy of the header, instead
of taking ownership.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/204>
This commit is contained in:
Doug Nazar 2021-05-04 20:45:19 -04:00 committed by GStreamer Marge Bot
parent 5f5b812844
commit 4c6e57ad33

View file

@ -3018,7 +3018,8 @@ handle_setup_request (GstRTSPClient * client, GstRTSPContext * ctx)
(gdouble) seekable / GST_SECOND); (gdouble) seekable / GST_SECOND);
gst_rtsp_message_add_header (ctx->response, GST_RTSP_HDR_MEDIA_PROPERTIES, gst_rtsp_message_add_header (ctx->response, GST_RTSP_HDR_MEDIA_PROPERTIES,
g_string_free (media_properties, FALSE)); media_properties->str);
g_string_free (media_properties, TRUE);
/* TODO Check how Accept-Ranges should be filled */ /* TODO Check how Accept-Ranges should be filled */
gst_rtsp_message_add_header (ctx->request, GST_RTSP_HDR_ACCEPT_RANGES, gst_rtsp_message_add_header (ctx->request, GST_RTSP_HDR_ACCEPT_RANGES,
"npt, clock, smpte, clock"); "npt, clock, smpte, clock");