libvpxenc: clean memory on error

CC: libav-stable@libav.org
Bug-Id: CID 733795
This commit is contained in:
Vittorio Giovara 2014-11-17 00:22:28 +01:00
parent a28468d0da
commit 771656bd85
1 changed files with 1 additions and 0 deletions

View File

@ -470,6 +470,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_freep(&cx_frame);
return AVERROR(ENOMEM);
}
memcpy(cx_frame->buf, pkt->data.frame.buf, pkt->data.frame.sz);