]> git.sesse.net Git - ffmpeg/commit
avcodec/av1dec: Fix leak in case of failure
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 4 Dec 2020 17:09:48 +0000 (18:09 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 4 Dec 2020 23:29:09 +0000 (00:29 +0100)
commite546d029198950f589f7d9820970e599fba2ad30
tree2f8f1cee787778bf1bf96f76041f3271cddacc17
parentfef17e89283f8b72fc125cd066dce15a875802f6
avcodec/av1dec: Fix leak in case of failure

A reference to an AV1RawFrameHeader and consequently the
AV1RawFrameHeader itself and everything it has a reference to leak
if the hardware has no AV1 decoding capabilities or if some other error
happens. It happens e.g. in the cbs-av1-av1-1-b8-02-allintra FATE-test;
it has just been masked because the return value of ffmpeg (which
indicates failure when using Valgrind or ASAN) is ignored when doing
tests of type md5.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/av1dec.c