From 35cec4c006d5b54434b46f56ba92485fc1d3853a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 2 Feb 2009 10:09:07 +0100 Subject: [PATCH] Fix string leak in rtspmessage when we remove a header field from a message we must free the value associated with the key to avoid a memory leak. --- gst-libs/gst/rtsp/gstrtspmessage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst-libs/gst/rtsp/gstrtspmessage.c b/gst-libs/gst/rtsp/gstrtspmessage.c index 44586b8c1..f15dad810 100644 --- a/gst-libs/gst/rtsp/gstrtspmessage.c +++ b/gst-libs/gst/rtsp/gstrtspmessage.c @@ -563,6 +563,7 @@ gst_rtsp_message_remove_header (GstRTSPMessage * msg, GstRTSPHeaderField field, if (key_value.field == field && (indx == -1 || cnt++ == indx)) { g_array_remove_index (msg->hdr_fields, i); + g_free (key_value.value); res = GST_RTSP_OK; if (indx != -1) break; -- 2.34.1