]> git.sesse.net Git - vlc/commitdiff
sap.c: fix too early free in demux
authorSigmund Augdal Helberg <sigmunau@videolan.org>
Thu, 20 Jan 2005 19:58:02 +0000 (19:58 +0000)
committerSigmund Augdal Helberg <sigmunau@videolan.org>
Thu, 20 Jan 2005 19:58:02 +0000 (19:58 +0000)
modules/services_discovery/sap.c

index 359e52e70dcba38920446acadd287440c440e236..fb538325526c47d576bce763c78a4f41fa878d54 100644 (file)
@@ -427,7 +427,6 @@ static int OpenDemux( vlc_object_t *p_this )
     p_demux->pf_demux = Demux;
 
     free( psz_sdp );
-    if( p_sdp ) FreeSDP( p_sdp );
     return VLC_SUCCESS;
 
 error:
@@ -591,6 +590,7 @@ static int Demux( demux_t *p_demux )
                  PLAYLIST_APPEND, PLAYLIST_END );
 
    vlc_object_release( p_playlist );
+    if( p_sdp ) FreeSDP( p_sdp );
 
    return VLC_SUCCESS;
 }