]> git.sesse.net Git - ffmpeg/commit
dnn/dnn_backend_native_layer_conv2d: Fix memleak on error
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 10 Mar 2021 16:22:29 +0000 (17:22 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 11 Mar 2021 12:06:32 +0000 (13:06 +0100)
commit508d7005a00ea0d047834d661109c57a1bacef53
tree7d10a94e6f5f7174cfe4556e8c2f5b81a5e877aa
parent16e36d5c0cb9573b10cbbc5c40aaec58d4a340e7
dnn/dnn_backend_native_layer_conv2d: Fix memleak on error

If an error happens when preparing the output data buffer, an already
allocated array would leak. Fix this by postponing its allocation.

Fixes Coverity issue #1473531.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavfilter/dnn/dnn_backend_native_layer_conv2d.c