libvpxenc: clean memory on error

CC: libav-stable@libav.org
Bug-Id: CID 733795
pull/96/head
Vittorio Giovara 10 years ago
parent a28468d0da
commit 771656bd85
  1. 1
      libavcodec/libvpxenc.c

@ -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);

Loading…
Cancel
Save