mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[APPHELP] Prevent a nullptr dereference
This commit is contained in:
parent
6969e85b29
commit
e984cabad2
1 changed files with 7 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Application compatibility module
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Shim matching / data (un)packing
|
||||
* COPYRIGHT: Copyright 2011 André Hentschel
|
||||
* Copyright 2013 Mislav Blaževic
|
||||
* Copyright 2015-2018 Mark Jansen (mark.jansen@reactos.org)
|
||||
* Copyright 2015-2019 Mark Jansen (mark.jansen@reactos.org)
|
||||
*/
|
||||
|
||||
#define WIN32_NO_STATUS
|
||||
|
@ -416,8 +416,11 @@ HSDB WINAPI SdbInitDatabase(DWORD flags, LPCWSTR path)
|
|||
*/
|
||||
void WINAPI SdbReleaseDatabase(HSDB hsdb)
|
||||
{
|
||||
SdbCloseDatabase(hsdb->pdb);
|
||||
SdbFree(hsdb);
|
||||
if (hsdb)
|
||||
{
|
||||
SdbCloseDatabase(hsdb->pdb);
|
||||
SdbFree(hsdb);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue