mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +00:00
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.
This commit is contained in:
parent
0ccab4d247
commit
385ed6384f
2 changed files with 16 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue