rtpjitterbuffer: Fix invalid memory access in rtp_jitter_buffer_pop()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1973>
This commit is contained in:
Sangchul Lee 2022-03-15 15:44:17 +09:00 committed by GStreamer Marge Bot
parent 8cb5d9f49e
commit 7691c6776a

View file

@ -1309,7 +1309,8 @@ rtp_jitter_buffer_pop (RTPJitterBuffer * jbuf, gint * percent)
/* let's clear the pointers so we can ensure we don't free items that are /* let's clear the pointers so we can ensure we don't free items that are
* still in the jitterbuffer */ * still in the jitterbuffer */
item->next = item->prev = NULL; if (item)
item->next = item->prev = NULL;
return (RTPJitterBufferItem *) item; return (RTPJitterBufferItem *) item;
} }