]> git.sesse.net Git - ffmpeg/commit
avfilter/vf_vpp_qsv: Fix leak of AVFilterFormats on error
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 7 Aug 2020 03:54:34 +0000 (05:54 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 23 Aug 2020 21:09:32 +0000 (23:09 +0200)
commitc4beb0783bd2470edbcc8da9e264c7fe1c10d7cc
tree2666ababa4d8075bd2ccc9ed5b1e4898f2023141
parent6a65449954d466e76c1166f524d2f6cde28c3c96
avfilter/vf_vpp_qsv: Fix leak of AVFilterFormats on error

The vpp_qsv's query_formats function allocated two AVFilterFormats,
before storing them permanently. If storing the first of them fails,
the function simply returns and the second leaks. This has been fixed by
only allocating the second AVFilterFormats structure after the first one
has been successfully stored.

Fixes Coverity issue #1422231.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavfilter/vf_vpp_qsv.c