From: Wim Taymans Date: Mon, 2 Feb 2009 09:09:07 +0000 (+0100) Subject: Fix string leak in rtspmessage X-Git-Tag: 1.19.3~511^2~10042 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35cec4c006d5b54434b46f56ba92485fc1d3853a;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/gst-libs/gst/rtsp/gstrtspmessage.c b/gst-libs/gst/rtsp/gstrtspmessage.c index 44586b8..f15dad8 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;