Commit 385ed638 authored by Tommi Myöhänen's avatar Tommi Myöhänen Committed by Wim Taymans

gst-libs/gst/rtsp/gstrtspmessage.c: Fix leaking headers. Fixes #496761.

Original commit message from CVS:
Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>
* gst-libs/gst/rtsp/gstrtspmessage.c: (gst_rtsp_message_unset):
Fix leaking headers. Fixes #496761.
parent 0ccab4d2
2007-11-16 Wim Taymans <wim.taymans@gmail.com>
Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>
* gst-libs/gst/rtsp/gstrtspmessage.c: (gst_rtsp_message_unset):
Fix leaking headers. Fixes #496761.
2007-11-16 Wim Taymans <wim.taymans@gmail.com>
Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>
......@@ -452,9 +452,16 @@ gst_rtsp_message_unset (GstRTSPMessage * msg)
break;
}
if (msg->hdr_fields != NULL)
g_array_free (msg->hdr_fields, TRUE);
if (msg->hdr_fields != NULL) {
gint i;
for (i = 0; i < msg->hdr_fields->len; i++) {
RTSPKeyValue *keyval = &g_array_index (msg->hdr_fields, RTSPKeyValue, i);
g_free (keyval->value);
}
g_array_free (msg->hdr_fields, TRUE);
}
g_free (msg->body);
memset (msg, 0, sizeof *msg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment