mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-01 01:47:31 -04:00
reset Qshared ptr (#5470)
CLI: Fix heapUseAfterFree in db-create command
This commit is contained in:
parent
829697d53e
commit
9fd9d65995
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue