You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
libxvid: use av_freep() for saftey
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -739,8 +739,8 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) {
|
|||||||
|
|
||||||
av_freep(&avctx->extradata);
|
av_freep(&avctx->extradata);
|
||||||
if( x->twopassbuffer != NULL ) {
|
if( x->twopassbuffer != NULL ) {
|
||||||
av_free(x->twopassbuffer);
|
av_freep(&x->twopassbuffer);
|
||||||
av_free(x->old_twopassbuffer);
|
av_freep(&x->old_twopassbuffer);
|
||||||
avctx->stats_out = NULL;
|
avctx->stats_out = NULL;
|
||||||
}
|
}
|
||||||
if (x->twopassfd>=0) {
|
if (x->twopassfd>=0) {
|
||||||
@@ -748,9 +748,9 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) {
|
|||||||
close(x->twopassfd);
|
close(x->twopassfd);
|
||||||
x->twopassfd = -1;
|
x->twopassfd = -1;
|
||||||
}
|
}
|
||||||
av_free(x->twopassfile);
|
av_freep(&x->twopassfile);
|
||||||
av_free(x->intra_matrix);
|
av_freep(&x->intra_matrix);
|
||||||
av_free(x->inter_matrix);
|
av_freep(&x->inter_matrix);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user