Commit 05f10ae5 authored by Rémi Duraffort's avatar Rémi Duraffort

rss: fix a memleak (double strdup) and add a missing const.

(cherry picked from commit f759a373)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent 19f23817
...@@ -632,12 +632,12 @@ static picture_t *LoadImage( filter_t *p_filter, const char *psz_url ) ...@@ -632,12 +632,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 * remove all ' ' '\t' '\n' '\r' characters from the begining and end of the
* string. * string.
***************************************************************************/ ***************************************************************************/
static char *removeWhiteChars( char *psz_src ) static char *removeWhiteChars( const char *psz_src )
{ {
char *psz_src2 = strdup( psz_src ); char *psz_src2,*psz_clean, *psz_clean2;
char *psz_clean = strdup( psz_src2 ); psz_src2 = psz_clean = strdup( psz_src );
char *psz_clean2;
int i; int i;
while( ( *psz_clean == ' ' || *psz_clean == '\t' while( ( *psz_clean == ' ' || *psz_clean == '\t'
|| *psz_clean == '\n' || *psz_clean == '\r' ) || *psz_clean == '\n' || *psz_clean == '\r' )
&& *psz_clean != '\0' ) && *psz_clean != '\0' )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment