storage/State: fix memory leak after database mount failure

Caused by commit 64d141f71e

This wasn't a serious memory leak, because after a mount failure, MPD
would abort anyway, which is subject to the next commit.
This commit is contained in:
Max Kellermann 2018-01-02 14:05:07 +01:00
parent 4db1b1b250
commit a20b326807

View File

@ -104,6 +104,7 @@ storage_state_restore(const char *line, TextFile &file, Instance &instance)
try {
((SimpleDatabase *)db)->Mount(uri.c_str(), url.c_str());
} catch (...) {
delete storage;
throw;
}
}