mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
jpeglsnec: fix memleak of state in error case
Fixes CID733794 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
104b1d9e10
commit
34bbab432c
@ -293,8 +293,10 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt,
|
||||
ls_store_lse(state, &pb);
|
||||
|
||||
zero = av_mallocz(FFABS(p->linesize[0]));
|
||||
if (!zero)
|
||||
if (!zero) {
|
||||
av_free(state);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
last = zero;
|
||||
cur = p->data[0];
|
||||
if(avctx->pix_fmt == AV_PIX_FMT_GRAY8){
|
||||
|
Loading…
Reference in New Issue
Block a user