db/simple: call ReturnSong() on mounted database

Fixes a memory leak, or an assertion failure in the debug build.
This commit is contained in:
Max Kellermann 2019-02-22 14:51:51 +01:00
parent 3ada464020
commit 30e0644722
2 changed files with 2 additions and 0 deletions

1
NEWS
View File

@ -8,6 +8,7 @@ ver 0.21.5 (not yet released)
* storage
- udisks: fix "AlreadyMounted" error
- udisks: use relative path from mount URI
- fix memory leak
* input
- buffer: fix crash bug when playing remote WAV file
* tags

View File

@ -218,6 +218,7 @@ SimpleDatabase::GetSong(const char *uri) const
prefixed_light_song =
new PrefixedLightSong(*song, r.directory->GetPath());
r.directory->mounted_database->ReturnSong(song);
return prefixed_light_song;
}