reset Qshared ptr (#5470)

CLI: Fix heapUseAfterFree in db-create command
This commit is contained in:
Bernhard Berg 2020-09-26 15:56:45 +02:00 committed by GitHub
parent 829697d53e
commit 9fd9d65995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -247,6 +247,10 @@ int main(int argc, char** argv)
arguments.removeFirst();
int exitCode = command->execute(arguments);
if (command->currentDatabase) {
command->currentDatabase.reset();
}
#if defined(WITH_ASAN) && defined(WITH_LSAN)
// do leak check here to prevent massive tail of end-of-process leak errors from third-party libraries
__lsan_do_leak_check();