vlc | branch: master | Hannes Domani <[email protected]> | Tue Jul 28 18:12:27 
2015 +0200| [7a06d63a3b8be54d7994d68b4ac7c9c05210a815] | committer: 
Jean-Baptiste Kempf

avcodec: fix memory leak

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7a06d63a3b8be54d7994d68b4ac7c9c05210a815
---

 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 e1be3a5..c3164a6 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;

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to