Browse Source

libvpxenc: fix memleak on error path

Fixes CID733795
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
104b1d9e10
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavcodec/libvpxenc.c

+ 1
- 0
libavcodec/libvpxenc.c View File

@@ -491,6 +491,7 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out,
av_log(avctx, AV_LOG_ERROR,
"Data buffer alloc (%zu bytes) failed\n",
cx_frame->sz);
av_free(cx_frame);
return AVERROR(ENOMEM);
}
memcpy(cx_frame->buf, pkt->data.frame.buf, pkt->data.frame.sz);


Loading…
Cancel
Save