@@ -176,8 +176,12 @@ std::string AlbumArtProvider::get_image(const std::string &artist, const std::st
176 fread(buf, 1, s, f);
176 fread(buf, 1, s, f);
177 fclose(f);
177 fclose(f);
179− // Fixme, leaks buf if throws.
179+ try {
180− cache.add_art(info.artist, info.album, buf, s);
180+ cache.add_art(info.artist, info.album, buf, s);
181 delete []buf;
185 delete []buf;
182 return cache.get_art_file(info.artist, info.album);
186 return cache.get_art_file(info.artist, info.album);