mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
rtp: fix buffer leak when gst_rtp_buffer_map() fails because of broken data
Makes libs/rtp unit test valgrind clean.
This commit is contained in:
parent
1968127650
commit
392d3225ce
1 changed files with 7 additions and 0 deletions
|
@ -443,7 +443,14 @@ wrong_padding:
|
|||
}
|
||||
dump_packet:
|
||||
{
|
||||
gint i;
|
||||
|
||||
GST_MEMDUMP ("buffer", data, size);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (rtp->map); ++i) {
|
||||
if (rtp->data[i] != NULL)
|
||||
gst_buffer_unmap (buffer, &rtp->map[i]);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue