diff mbox series

[FFmpeg-devel,16/16] avcodec/vble: Don't free buffer known to be NULL

Message ID 20200913025753.274772-16-andreas.rheinhardt@gmail.com
State Accepted
Commit a265e6604eb411316ec7ec91ba1bfaa37c71ef2d
Headers show
Series [FFmpeg-devel,01/16] avcodec/snowdec: Use ff_snow_common_init() directly | expand


Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 13, 2020, 2:57 a.m. UTC
Freeing a buffer allocated in the VBLE decoder's init function
is the only thing the decoder's close function does and this implies
that it is unnecessary to call it in case said allocation fails. Yet
this is what has been done.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
 libavcodec/vble.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series


diff --git a/libavcodec/vble.c b/libavcodec/vble.c
index c48c13127a..2cddd550b1 100644
--- a/libavcodec/vble.c
+++ b/libavcodec/vble.c
@@ -197,7 +197,6 @@  static av_cold int vble_decode_init(AVCodecContext *avctx)
     if (!ctx->val) {
         av_log(avctx, AV_LOG_ERROR, "Could not allocate values buffer.\n");
-        vble_decode_close(avctx);
         return AVERROR(ENOMEM);