diff options
author | Burkhard Plaum <plaum@ipf.uni-stuttgart.de> | 2005-08-26 15:41:28 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-08-26 15:41:28 +0000 |
commit | 5b2bf9434078d0a57482658d82a26c3b2a13493d (patch) | |
tree | 019a62d25c49a76bea4df6693f558fd7f39afa8c | |
parent | ba17363ff71e68d89b64bc6f129460e9056b9de6 (diff) | |
download | ffmpeg-5b2bf9434078d0a57482658d82a26c3b2a13493d.tar.gz |
Fix for memleak in dv.c patch by (Burkhard Plaum; plaum, ipf uni-stuttgart de)
Originally committed as revision 4539 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/dv.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c index d2739d33b7..1cfdae65b2 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -109,14 +109,13 @@ static int dvvideo_init(AVCodecContext *avctx) done = 1; - dv_vlc_map = av_mallocz(DV_VLC_MAP_LEV_SIZE*DV_VLC_MAP_RUN_SIZE*sizeof(struct dv_vlc_pair)); + dv_vlc_map = av_mallocz_static(DV_VLC_MAP_LEV_SIZE*DV_VLC_MAP_RUN_SIZE*sizeof(struct dv_vlc_pair)); if (!dv_vlc_map) return -ENOMEM; /* dv_anchor lets each thread know its Id */ dv_anchor = av_malloc(12*27*sizeof(void*)); if (!dv_anchor) { - av_free(dv_vlc_map); return -ENOMEM; } for (i=0; i<12*27; i++) @@ -149,7 +148,6 @@ static int dvvideo_init(AVCodecContext *avctx) dv_rl_vlc = av_malloc(dv_vlc.table_size * sizeof(RL_VLC_ELEM)); if (!dv_rl_vlc) { av_free(dv_anchor); - av_free(dv_vlc_map); return -ENOMEM; } for(i = 0; i < dv_vlc.table_size; i++){ |