[vlc-devel] commit: delux_shoutcast: no need to strdup the string. ( Rémi Duraffort )
git version control
git at videolan.org
Mon Aug 17 14:36:03 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Aug 6 10:43:36 2009 +0200| [2ba8bf06c17decf836531a4760cf779e89ead16f] | committer: Rémi Duraffort
delux_shoutcast: no need to strdup the string.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2ba8bf06c17decf836531a4760cf779e89ead16f
---
modules/demux/playlist/shoutcast.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/demux/playlist/shoutcast.c b/modules/demux/playlist/shoutcast.c
index 5f1abd3..e9eda49 100644
--- a/modules/demux/playlist/shoutcast.c
+++ b/modules/demux/playlist/shoutcast.c
@@ -157,7 +157,7 @@ error:
#define GET_VALUE( a ) \
if( !strcmp( psz_attrname, #a ) ) \
{ \
- psz_ ## a = strdup( psz_attrvalue ); \
+ psz_ ## a = psz_attrvalue; \
}
/* <genrelist>
* <genre name="the name"></genre>
@@ -212,12 +212,12 @@ static int DemuxGenre( demux_t *p_demux )
msg_Warn( p_demux,
"unexpected attribure %s in element %s",
psz_attrname,psz_eltname );
+ free( psz_attrvalue );
}
free( psz_attrname );
- free( psz_attrvalue );
}
}
- free( psz_eltname ); psz_eltname = NULL;
+ FREENULL( psz_eltname );
break;
case XML_READER_TEXT:
@@ -335,9 +335,9 @@ static int DemuxStation( demux_t *p_demux )
msg_Warn( p_demux,
"unexpected attribure %s in element %s",
psz_attrname, psz_eltname );
+ free( psz_attrvalue );
}
free( psz_attrname );
- free( psz_attrvalue );
}
}
else if( !strcmp( psz_eltname, "station" ) )
@@ -369,9 +369,9 @@ static int DemuxStation( demux_t *p_demux )
msg_Warn( p_demux,
"unexpected attribute %s in element %s",
psz_attrname, psz_eltname );
+ free( psz_attrvalue );
}
free( psz_attrname );
- free( psz_attrvalue );
}
}
free( psz_eltname );
More information about the vlc-devel
mailing list