mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-14 08:50:08 -05:00
reset Qshared ptr (#5470)
CLI: Fix heapUseAfterFree in db-create command
This commit is contained in:
parent
829697d53e
commit
9fd9d65995
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user