[vlc-devel] commit: rss: fix a memleak (double strdup) and ad a missing const. ( Rémi Duraffort )
git version control
git at videolan.org
Wed Jul 1 09:07:55 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Jul 1 09:07:19 2009 +0200| [f759a373ab6483c0d25d1bf84fd49151172c263a] | committer: Rémi Duraffort
rss: fix a memleak (double strdup) and ad a missing const.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f759a373ab6483c0d25d1bf84fd49151172c263a
---
modules/video_filter/rss.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/video_filter/rss.c b/modules/video_filter/rss.c
index 5f407d6..c663dd5 100644
--- a/modules/video_filter/rss.c
+++ b/modules/video_filter/rss.c
@@ -630,12 +630,12 @@ static picture_t *LoadImage( filter_t *p_filter, const char *psz_url )
* remove all ' ' '\t' '\n' '\r' characters from the begining and end of the
* string.
***************************************************************************/
-static char *removeWhiteChars( char *psz_src )
+static char *removeWhiteChars( const char *psz_src )
{
- char *psz_src2 = strdup( psz_src );
- char *psz_clean = strdup( psz_src2 );
- char *psz_clean2;
+ char *psz_src2,*psz_clean, *psz_clean2;
+ psz_src2 = psz_clean = strdup( psz_src );
int i;
+
while( ( *psz_clean == ' ' || *psz_clean == '\t'
|| *psz_clean == '\n' || *psz_clean == '\r' )
&& *psz_clean != '\0' )
More information about the vlc-devel
mailing list