From 74238741d1e471d03496f0ae3fd8632ffea28c0c Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Wed, 26 Nov 2003 06:11:30 +0000 Subject: [PATCH] notify memory checker about utf-8 strings --- src/mp3-scanner.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mp3-scanner.c b/src/mp3-scanner.c index 41527a75..68206d03 100644 --- a/src/mp3-scanner.c +++ b/src/mp3-scanner.c @@ -200,8 +200,10 @@ int scan_gettags(char *file, MP3FILE *pmp3) { used=0; utf8_text=NULL; - if((pid3frame->id[0] == 'T')&&(id3_field_getnstrings(&pid3frame->fields[1]))) + if((pid3frame->id[0] == 'T')&&(id3_field_getnstrings(&pid3frame->fields[1]))) { utf8_text=id3_ucs4_utf8duplicate(id3_field_getstrings(&pid3frame->fields[1],0)); + MEMNOTIFY(utf8_text); + } if(!strcmp(pid3frame->id,"TIT2")) { /* Title */ used=1; @@ -225,7 +227,7 @@ int scan_gettags(char *file, MP3FILE *pmp3) { DPRINTF(ERR_DEBUG," Comment: %s\n",utf8_text); } - if((!used) && (pid3frame->id[0]=='T') && utf8_text) + if((!used) && (pid3frame->id[0]=='T') && (utf8_text)) free(utf8_text); index++;