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.
This commit is contained in:
parent
a6bc6220d0
commit
35cec4c006
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user