diff --git a/src/db-memory.c b/src/db-memory.c index 1b9be8ae..b8f2c2ae 100644 --- a/src/db-memory.c +++ b/src/db-memory.c @@ -336,6 +336,9 @@ int db_add(MP3FILE *mp3file) { if(mp3file->comment) g = g && (pnew->mp3file.comment=strdup(mp3file->comment)); + if(mp3file->type) + g = g && (pnew->mp3file.type=strdup(mp3file->type)); + if(!g) { DPRINTF(ERR_WARN,"Malloc error in db_add\n"); db_freerecord(pnew); @@ -377,6 +380,7 @@ void db_freerecord(MP3RECORD *mp3record) { MAYBEFREE(mp3record->mp3file.album); MAYBEFREE(mp3record->mp3file.genre); MAYBEFREE(mp3record->mp3file.comment); + MAYBEFREE(mp3record->mp3file.type); free(mp3record); }