git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6858023
)
Memory leaks
author
Rémi Denis-Courmont
<rdenis@simphalempin.com>
Sat, 17 Jan 2009 20:15:57 +0000
(22:15 +0200)
committer
Rémi Denis-Courmont
<rdenis@simphalempin.com>
Sat, 17 Jan 2009 20:16:16 +0000
(22:16 +0200)
src/control/core.c
patch
|
blob
|
history
diff --git
a/src/control/core.c
b/src/control/core.c
index
297131f
..
5098da9
100644
(file)
--- 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;