libvpxenc: fix memleak on error path
Fixes CID733795
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 104b1d9e10
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -483,6 +483,7 @@ static int queue_frames(AVCodecContext *avctx, uint8_t *buf, int buf_size,
|
|||||||
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_free(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);
|
||||||
|
Reference in New Issue
Block a user