[vlc-devel] commit: Fix potential memleak. ( Rémi Duraffort )
git version control
git at videolan.org
Thu Jul 31 19:35:47 CEST 2008
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Jul 31 19:18:38 2008 +0200| [cf68c2a368ab5f6654da0669938c83ec38f8b363]
Fix potential memleak.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf68c2a368ab5f6654da0669938c83ec38f8b363
---
modules/video_filter/logo.c | 2 ++
modules/video_filter/rss.c | 5 +++++
modules/video_output/image.c | 1 +
3 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/modules/video_filter/logo.c b/modules/video_filter/logo.c
index f274dc2..37e51f2 100644
--- a/modules/video_filter/logo.c
+++ b/modules/video_filter/logo.c
@@ -331,6 +331,8 @@ static int Create( vlc_object_t *p_this )
if( !p_logo_list->psz_filename || !*p_logo_list->psz_filename )
{
msg_Err( p_vout, "logo file not specified" );
+ free( p_logo_list->psz_filename );
+ free( p_sys );
return VLC_EGENERIC;
}
diff --git a/modules/video_filter/rss.c b/modules/video_filter/rss.c
index 0465a2c..70bbdf1 100644
--- a/modules/video_filter/rss.c
+++ b/modules/video_filter/rss.c
@@ -266,6 +266,7 @@ static int CreateFilter( vlc_object_t *p_this )
{
vlc_mutex_unlock( &p_sys->lock );
vlc_mutex_destroy( &p_sys->lock );
+ free( p_sys->psz_urls );
free( p_sys );
return VLC_ENOMEM;
}
@@ -277,6 +278,7 @@ static int CreateFilter( vlc_object_t *p_this )
free( p_sys->psz_marquee );
vlc_mutex_unlock( &p_sys->lock );
vlc_mutex_destroy( &p_sys->lock );
+ free( p_sys->psz_urls );
free( p_sys );
return VLC_ENOMEM;
}
@@ -301,6 +303,7 @@ static int CreateFilter( vlc_object_t *p_this )
free( p_sys->psz_marquee );
vlc_mutex_unlock( &p_sys->lock );
vlc_mutex_destroy( &p_sys->lock );
+ free( p_sys->psz_urls );
free( p_sys );
return VLC_EGENERIC;
}
@@ -312,6 +315,7 @@ static int CreateFilter( vlc_object_t *p_this )
free( p_sys->psz_marquee );
vlc_mutex_unlock( &p_sys->lock );
vlc_mutex_destroy( &p_sys->lock );
+ free( p_sys->psz_urls );
free( p_sys );
return VLC_EGENERIC;
}
@@ -324,6 +328,7 @@ static int CreateFilter( vlc_object_t *p_this )
FreeRSS( p_filter );
vlc_mutex_unlock( &p_sys->lock );
vlc_mutex_destroy( &p_sys->lock );
+ free( p_sys->psz_urls );
free( p_sys );
return VLC_EGENERIC;
}
diff --git a/modules/video_output/image.c b/modules/video_output/image.c
index 05f8891..3bcecbc 100644
--- a/modules/video_output/image.c
+++ b/modules/video_output/image.c
@@ -174,6 +174,7 @@ static int Create( vlc_object_t *p_this )
{
msg_Err( p_this, "unable to create image handler") ;
FREENULL( p_vout->p_sys->psz_prefix );
+ FREENULL( p_vout->p_sys->psz_format );
FREENULL( p_vout->p_sys );
return VLC_EGENERIC;
}
More information about the vlc-devel
mailing list