[vlc-devel] commit: Forgotten mem leak. ( Rémi Duraffort )
git version control
git at videolan.org
Thu Jul 31 19:43:30 CEST 2008
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Jul 31 19:46:44 2008 +0200| [31d526a9f743e9f122b2a0e14fef5b318adc1dba]
Forgotten mem leak.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=31d526a9f743e9f122b2a0e14fef5b318adc1dba
---
modules/video_filter/blendbench.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/modules/video_filter/blendbench.c b/modules/video_filter/blendbench.c
index e0302a2..0c93a9f 100644
--- a/modules/video_filter/blendbench.c
+++ b/modules/video_filter/blendbench.c
@@ -152,7 +152,7 @@ static int Create( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t *)p_this;
filter_sys_t *p_sys;
- char *psz_temp;
+ char *psz_temp, *psz_cmd;
/* Allocate structure */
p_filter->p_sys = malloc( sizeof( filter_sys_t ) );
@@ -177,19 +177,21 @@ static int Create( vlc_object_t *p_this )
psz_temp = var_CreateGetStringCommand( p_filter, CFG_PREFIX "base-chroma" );
p_sys->i_base_chroma = VLC_FOURCC( psz_temp[0], psz_temp[1],
psz_temp[2], psz_temp[3] );
- free( psz_temp );
+ psz_cmd = var_CreateGetStringCommand( p_filter, CFG_PREFIX "base-image" );
blendbench_LoadImage( p_this, &p_sys->p_base_image, p_sys->i_base_chroma,
- var_CreateGetStringCommand( p_filter, CFG_PREFIX "base-image" ),
- "Base" );
+ psz_cmd, "Base" );
+ free( psz_temp );
+ free( psz_cmd );
psz_temp = var_CreateGetStringCommand( p_filter,
CFG_PREFIX "blend-chroma" );
p_sys->i_blend_chroma = VLC_FOURCC( psz_temp[0], psz_temp[1],
psz_temp[2], psz_temp[3] );
- free( psz_temp );
+ psz_cmd = var_CreateGetStringCommand( p_filter, CFG_PREFIX "blend-image" );
blendbench_LoadImage( p_this, &p_sys->p_blend_image, p_sys->i_blend_chroma,
- var_CreateGetStringCommand( p_filter, CFG_PREFIX "blend-image" ),
- "Blend" );
+ psz_cmd, "Blend" );
+ free( psz_temp );
+ free( psz_cmd );
return VLC_SUCCESS;
}
More information about the vlc-devel
mailing list