[vlc-commits] demux: ogg: correctly free vorbis info (refs #18015)

Francois Cartegnie git at videolan.org
Wed Feb 15 11:13:28 CET 2017


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Feb 15 10:57:01 2017 +0100| [ef064b3ca708234b3638587ded39f915858773b5] | committer: Francois Cartegnie

demux: ogg: correctly free vorbis info (refs #18015)

bp of b8b6cc3bb8e24c0d556ce2c40fc1fad65921cdb0

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

 modules/demux/ogg.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 94d8894..6f37d92 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -2199,9 +2199,11 @@ static void Ogg_CleanSpecificData( logical_stream_t *p_stream )
 #ifdef HAVE_LIBVORBIS
     if ( p_stream->fmt.i_codec == VLC_CODEC_VORBIS )
     {
-        vorbis_info_clear( p_stream->special.vorbis.p_info );
+        if( p_stream->special.vorbis.p_info )
+            vorbis_info_clear( p_stream->special.vorbis.p_info );
         FREENULL( p_stream->special.vorbis.p_info );
-        vorbis_comment_clear( p_stream->special.vorbis.p_comment );
+        if( p_stream->special.vorbis.p_comment )
+            vorbis_comment_clear( p_stream->special.vorbis.p_comment );
         FREENULL( p_stream->special.vorbis.p_comment );
         p_stream->special.vorbis.i_headers_flags = 0;
     }



More information about the vlc-commits mailing list