mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-07 11:12:17 +00:00
rtpbuffer: fix memory leak when gst_rtp_buffer_map fails
Make sure rtp->data[3] is set before jumping to error path. https://bugzilla.gnome.org/show_bug.cgi?id=729117
This commit is contained in:
parent
96efc280d5
commit
0011d8cbb5
1 changed files with 3 additions and 3 deletions
|
@ -403,11 +403,11 @@ gst_rtp_buffer_map (GstBuffer * buffer, GstMapFlags flags, GstRTPBuffer * rtp)
|
|||
goto map_failed;
|
||||
|
||||
padding = rtp->map[3].data[skip];
|
||||
if (skip + 1 < padding)
|
||||
goto wrong_length;
|
||||
|
||||
rtp->data[3] = rtp->map[3].data + skip + 1 - padding;
|
||||
rtp->size[3] = padding;
|
||||
|
||||
if (skip + 1 < padding)
|
||||
goto wrong_length;
|
||||
} else {
|
||||
rtp->data[3] = NULL;
|
||||
rtp->size[3] = 0;
|
||||
|
|
Loading…
Reference in a new issue