[vlc-devel] commit: libvlc: destroy the intf variable only if created just before. ( Rémi Duraffort )

git version control git at videolan.org
Mon Dec 28 14:44:30 CET 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Dec 23 13:30:11 2009 +0100| [9f584dfb5622cb5b7a81f3e516179b76236c6cc2] | committer: Rémi Duraffort 

libvlc: destroy the intf variable only if created just before.

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

 src/libvlc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/libvlc.c b/src/libvlc.c
index c308757..b39fbf2 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;
 }
 




More information about the vlc-devel mailing list