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:
6f39c29
)
libvlc: fix a memory leak
author
Rafaël Carré
<funman@videolan.org>
Tue, 16 Oct 2007 15:42:15 +0000
(15:42 +0000)
committer
Rafaël Carré
<funman@videolan.org>
Tue, 16 Oct 2007 15:42:15 +0000
(15:42 +0000)
src/libvlc-common.c
patch
|
blob
|
history
diff --git
a/src/libvlc-common.c
b/src/libvlc-common.c
index
25824c0
..
01a329f
100644
(file)
--- a/
src/libvlc-common.c
+++ b/
src/libvlc-common.c
@@
-818,7
+818,7
@@
int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, char *ppsz_argv[] )
}
else if( psz_control && *psz_control )
{
-
if( psz_modules )
free( psz_modules );
+ free( psz_modules );
psz_modules = strdup( psz_control );
}
@@
-841,10
+841,8
@@
int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, char *ppsz_argv[] )
free( psz_temp );
}
}
- if ( psz_modules )
- {
- free( psz_modules );
- }
+ free( psz_modules );
+ free( psz_control );
/*
* Always load the hotkeys interface if it exists