summaryrefslogtreecommitdiff
path: root/src/storage
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-01-02 14:05:07 +0100
committerMax Kellermann <max@musicpd.org>2018-01-02 14:05:07 +0100
commita20b3268079149c925189a7e51db3f79f5153f5a (patch)
tree7ab41a41d943e25ea5dfc94ecc3c227857567f86 /src/storage
parent4db1b1b25051f6399f5be477b1bed9644b8c2b71 (diff)
storage/State: fix memory leak after database mount failure
Caused by commit 64d141f71e690a4258ba9ee8712140bc9d961883 This wasn't a serious memory leak, because after a mount failure, MPD would abort anyway, which is subject to the next commit.
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/StorageState.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/storage/StorageState.cxx b/src/storage/StorageState.cxx
index 2e5530738..7c7d49295 100644
--- a/src/storage/StorageState.cxx
+++ b/src/storage/StorageState.cxx
@@ -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;
}
}