summaryrefslogtreecommitdiff
path: root/libavcodec/libxvid.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-02 20:29:47 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-02 20:31:07 +0100
commit8fe59240a15d38bd0e5911ba8167afd328e064d1 (patch)
tree255d538b3437b37dc03d302d556892f9ccab88fd /libavcodec/libxvid.c
parent6a8f6c773da2822adbca15f105cc31c32b40c168 (diff)
downloadffmpeg-8fe59240a15d38bd0e5911ba8167afd328e064d1.tar.gz
libxvid: use av_freep() for saftey
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libxvid.c')
-rw-r--r--libavcodec/libxvid.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
index 1528e141fc..9c86e3c617 100644
--- a/libavcodec/libxvid.c
+++ b/libavcodec/libxvid.c
@@ -739,8 +739,8 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) {
av_freep(&avctx->extradata);
if( x->twopassbuffer != NULL ) {
- av_free(x->twopassbuffer);
- av_free(x->old_twopassbuffer);
+ av_freep(&x->twopassbuffer);
+ av_freep(&x->old_twopassbuffer);
avctx->stats_out = NULL;
}
if (x->twopassfd>=0) {
@@ -748,9 +748,9 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) {
close(x->twopassfd);
x->twopassfd = -1;
}
- av_free(x->twopassfile);
- av_free(x->intra_matrix);
- av_free(x->inter_matrix);
+ av_freep(&x->twopassfile);
+ av_freep(&x->intra_matrix);
+ av_freep(&x->inter_matrix);
return 0;
}