]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/vble: Don't free buffer known to be NULL
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 13 Sep 2020 01:52:39 +0000 (03:52 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 16 Sep 2020 22:09:08 +0000 (00:09 +0200)
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

index c48c13127ad93d183c2fc7d200ead63e7b911c5c..2cddd550b1887232a334ab1c0762d899a6bc109c 100644 (file)
@@ -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);
     }