[vlc-devel] commit: logo: fix memleak. ( Rémi Duraffort )
git version control
git at videolan.org
Thu Aug 27 23:23:58 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Aug 27 22:59:15 2009 +0200| [cd579fd8ea606b56d7ee94dd6f6880c00dbfa23b] | committer: Rémi Duraffort
logo: fix memleak.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cd579fd8ea606b56d7ee94dd6f6880c00dbfa23b
---
modules/video_filter/logo.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/modules/video_filter/logo.c b/modules/video_filter/logo.c
index f3baa53..e7cecd1 100644
--- a/modules/video_filter/logo.c
+++ b/modules/video_filter/logo.c
@@ -629,13 +629,14 @@ static void LogoListLoad( vlc_object_t *p_this, logo_list_t *p_logo_list,
const char *psz_filename )
{
char *psz_list; /* the list: <logo>[,[<delay>[,[<alpha>]]]][;...] */
+ char *psz_original;
unsigned int i;
logo_t *p_logo; /* the parsing's result */
p_logo_list->i_counter = 0;
p_logo_list->i_next_pic = 0;
- psz_list = strdup( psz_filename );
+ psz_original = psz_list = strdup( psz_filename );
if( !psz_list )
abort();
@@ -699,6 +700,8 @@ static void LogoListLoad( vlc_object_t *p_this, logo_list_t *p_logo_list,
/* initialize so that on the first update it will wrap back to 0 */
p_logo_list->i_counter = p_logo_list->i_count - 1;
+
+ free( psz_original );
}
/**
More information about the vlc-devel
mailing list