mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-27 23:07:11 -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();
|
arguments.removeFirst();
|
||||||
int exitCode = command->execute(arguments);
|
int exitCode = command->execute(arguments);
|
||||||
|
|
||||||
|
if (command->currentDatabase) {
|
||||||
|
command->currentDatabase.reset();
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(WITH_ASAN) && defined(WITH_LSAN)
|
#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
|
// do leak check here to prevent massive tail of end-of-process leak errors from third-party libraries
|
||||||
__lsan_do_leak_check();
|
__lsan_do_leak_check();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user