Commit 771656bd authored by Vittorio Giovara's avatar Vittorio Giovara

libvpxenc: clean memory on error

CC: libav-stable@libav.org
Bug-Id: CID 733795
parent a28468d0
...@@ -470,6 +470,7 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out, ...@@ -470,6 +470,7 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out,
av_log(avctx, AV_LOG_ERROR, av_log(avctx, AV_LOG_ERROR,
"Data buffer alloc (%zu bytes) failed\n", "Data buffer alloc (%zu bytes) failed\n",
cx_frame->sz); cx_frame->sz);
av_freep(&cx_frame);
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
memcpy(cx_frame->buf, pkt->data.frame.buf, pkt->data.frame.sz); memcpy(cx_frame->buf, pkt->data.frame.buf, pkt->data.frame.sz);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment