[vlc-commits] packetizer: flac: Fix potential double free

Hugo Beauzée-Luyssen git at videolan.org
Mon Mar 19 18:02:22 CET 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Mar 19 17:55:54 2018 +0100| [5e4a88e01ba439835af5e7fd627168c15a4a5d8c] | committer: Hugo Beauzée-Luyssen

packetizer: flac: Fix potential double free

CID #1430164

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

 modules/packetizer/flac.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/packetizer/flac.c b/modules/packetizer/flac.c
index 7ed37b1db9..ff5e1ac076 100644
--- a/modules/packetizer/flac.c
+++ b/modules/packetizer/flac.c
@@ -503,6 +503,8 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
                 out->i_flags = p_sys->i_next_block_flags;
                 p_sys->i_next_block_flags = 0;
             }
+            else
+                p_sys->p_buf = NULL;
         }
 
         date_Increment( &p_sys->pts, p_sys->headerinfo.i_frame_length );



More information about the vlc-commits mailing list