From: RĂ©mi Duraffort Date: Wed, 23 Dec 2009 12:30:11 +0000 (+0100) Subject: libvlc: destroy the intf variable only if created just before. X-Git-Tag: 1.1.0-ff~1666 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=9f584dfb5622cb5b7a81f3e516179b76236c6cc2;p=vlc libvlc: destroy the intf variable only if created just before. --- diff --git a/src/libvlc.c b/src/libvlc.c index c3087573ef..b39fbf2af6 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -1171,6 +1171,7 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc, char const *psz_module ) "Use 'cvlc' to use vlc without interface.") ); } free( psz_interface ); + var_Destroy( p_libvlc, "intf" ); } /* Try to create the interface */ @@ -1178,7 +1179,6 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc, char const *psz_module ) if( ret ) msg_Err( p_libvlc, "interface \"%s\" initialization failed", psz_module ? psz_module : "default" ); - var_Destroy( p_libvlc, "intf" ); return ret; }