[vlc-devel] commit: Memory leaks ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Jan 17 21:16:20 CET 2009
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Jan 17 22:15:57 2009 +0200| [3e606132e77ab9b9a6231e133497112b6205cfe1] | committer: Rémi Denis-Courmont
Memory leaks
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3e606132e77ab9b9a6231e133497112b6205cfe1
---
src/control/core.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/control/core.c b/src/control/core.c
index 297131f..5098da9 100644
--- a/src/control/core.c
+++ b/src/control/core.c
@@ -122,15 +122,14 @@ libvlc_instance_t * libvlc_new( int argc, const char *const *argv,
/* Because we probably don't want a GUI by default */
i_ret = libvlc_InternalInit( p_libvlc_int, argc + 1, my_argv );
- if( i_ret == VLC_EEXITSUCCESS )
+ if( i_ret )
{
+ libvlc_InternalDestroy( p_libvlc_int );
free( p_new );
- return NULL;
- }
- else if( i_ret != 0 )
- {
- free( p_new );
- RAISENULL( "VLC initialization failed" );
+ if( i_ret == VLC_EEXITSUCCESS )
+ return NULL;
+ else
+ RAISENULL( "VLC initialization failed" );
}
p_new->p_libvlc_int = p_libvlc_int;
More information about the vlc-devel
mailing list