reset Qshared ptr (#5470)

CLI: Fix heapUseAfterFree in db-create command
This commit is contained in:
Bernhard Berg authored and GitHub committed 2020-09-26 09:56:45 -04:00
1 parent 829697d53e
commit 9fd9d65995
1 file changed
+4
+4
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();