[vlc-commits] demux: tta: don't set i_extra on failed alloc

Francois Cartegnie git at videolan.org
Thu Mar 23 21:11:41 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Mar 23 21:00:15 2017 +0100| [8f98d8de7bc04632daed6bcad5605cdade4f6260] | committer: Francois Cartegnie

demux: tta: don't set i_extra on failed alloc

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

 modules/demux/tta.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/tta.c b/modules/demux/tta.c
index 814f31e..aad60d6 100644
--- a/modules/demux/tta.c
+++ b/modules/demux/tta.c
@@ -143,7 +143,10 @@ static int Open( vlc_object_t * p_this )
     fmt.i_extra = 22 + i_seektable_size + 4;
     fmt.p_extra = p_fullheader = malloc( fmt.i_extra );
     if( !p_fullheader )
+    {
+        fmt.i_extra = 0;
         goto error;
+    }
 
     memcpy( p_fullheader, p_header, 22 );
     p_fullheader += 22;



More information about the vlc-commits mailing list