From feb2fd1e878a6f4388e72302ccb205bd974c43f6 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Wed, 27 May 2009 23:09:11 +0000 Subject: [PATCH] * Fix a small potential memory leak. --- tagutils/tagutils-mp3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tagutils/tagutils-mp3.c b/tagutils/tagutils-mp3.c index eb532ba..142af72 100644 --- a/tagutils/tagutils-mp3.c +++ b/tagutils/tagutils-mp3.c @@ -239,11 +239,11 @@ _get_mp3tags(char *file, struct song_metadata *psong) native_text = id3_field_getfullstring(&pid3frame->fields[3]); if(native_text) { - //if (psong->comment) - // free(psong->comment); utf8_text = (unsigned char*)id3_ucs4_utf8duplicate(native_text); if(utf8_text) { + if (psong->comment) + free(psong->comment); psong->comment = (char*)utf8_text; } }