[vlc-devel] [PATCH 3/4] avcodec: fix memory leak
Hannes Domani
ssbssa at yahoo.de
Tue Jul 28 18:12:27 CEST 2015
---
modules/codec/avcodec/audio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index fd3a7c0..49e275f 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -368,6 +368,7 @@ static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block )
p_block = vlc_av_frame_Wrap(frame);
if (unlikely(p_block == NULL))
goto drop;
+ frame = NULL;
}
if (p_sys->b_extract)
@@ -403,6 +404,7 @@ static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block )
end:
*pp_block = NULL;
drop:
+ av_frame_free(&frame);
if( p_block != NULL )
block_Release(p_block);
return NULL;
--
2.4.6
More information about the vlc-devel
mailing list