TiVo: fix double free
authorClement Lecigne <clecigne@google.com>
Tue, 20 Dec 2011 15:44:10 +0000 (17:44 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 20 Dec 2011 15:52:48 +0000 (17:52 +0200)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
modules/demux/ty.c

index e916b41..b181a6a 100644 (file)
@@ -1887,6 +1887,7 @@ static int get_chunk_header(demux_t *p_demux)
     /*msg_Dbg( p_demux, "chunk has %d records", i_num_recs );*/
 
     free(p_sys->rec_hdrs);
+    p_sys->rec_hdrs = NULL;
 
     /* skip past the 4 bytes we "peeked" earlier */
     stream_Read( p_demux->s, NULL, 4 );