mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-05-10 10:24:45 +00:00
mpegts: test for allocation failure
While it's unlikely to get there, it silences the coverity warning on the error code path that we test for NULL before freeing, when all branches there are from locations where pmt cannot be NULL, and removing the NULL check makes the code more vulnerable to a hypothetical future branch from somewhere where it can be. Coverity 1139852
This commit is contained in:
parent
747542762e
commit
224cb81b8f
1 changed files with 4 additions and 0 deletions
|
@ -657,6 +657,10 @@ _parse_pmt (GstMpegTsSection * section)
|
|||
guint stream_info_length;
|
||||
|
||||
pmt = g_slice_new0 (GstMpegTsPMT);
|
||||
if (!pmt) {
|
||||
GST_WARNING ("Failed to allocate PMT structure");
|
||||
goto error;
|
||||
}
|
||||
|
||||
data = section->data;
|
||||
end = data + section->section_length;
|
||||
|
|
Loading…
Reference in a new issue