mirror of
https://github.com/reactos/reactos.git
synced 2024-07-03 03:04:22 +00:00
[APPHELP] Prevent a nullptr dereference
This commit is contained in:
parent
6969e85b29
commit
e984cabad2
|
@ -1,10 +1,10 @@
|
||||||
/*
|
/*
|
||||||
* PROJECT: ReactOS Application compatibility module
|
* 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
|
* PURPOSE: Shim matching / data (un)packing
|
||||||
* COPYRIGHT: Copyright 2011 André Hentschel
|
* COPYRIGHT: Copyright 2011 André Hentschel
|
||||||
* Copyright 2013 Mislav Blaževic
|
* 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
|
#define WIN32_NO_STATUS
|
||||||
|
@ -415,10 +415,13 @@ HSDB WINAPI SdbInitDatabase(DWORD flags, LPCWSTR path)
|
||||||
* @param [in] hsdb Handle to the shim database.
|
* @param [in] hsdb Handle to the shim database.
|
||||||
*/
|
*/
|
||||||
void WINAPI SdbReleaseDatabase(HSDB hsdb)
|
void WINAPI SdbReleaseDatabase(HSDB hsdb)
|
||||||
|
{
|
||||||
|
if (hsdb)
|
||||||
{
|
{
|
||||||
SdbCloseDatabase(hsdb->pdb);
|
SdbCloseDatabase(hsdb->pdb);
|
||||||
SdbFree(hsdb);
|
SdbFree(hsdb);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Queries database for a specified exe If hsdb is NULL default database shall be loaded and
|
* Queries database for a specified exe If hsdb is NULL default database shall be loaded and
|
||||||
|
|
Loading…
Reference in a new issue