mirror of
https://github.com/reactos/reactos.git
synced 2025-05-30 22:49:12 +00:00
[USETUP] Check for invalid INF handles before doing operations.
This commit is contained in:
parent
34e9290821
commit
9f1c8ac020
1 changed files with 5 additions and 0 deletions
|
@ -43,6 +43,8 @@ WINAPI
|
||||||
SetupCloseInfFile(
|
SetupCloseInfFile(
|
||||||
IN HINF InfHandle)
|
IN HINF InfHandle)
|
||||||
{
|
{
|
||||||
|
if (InfHandle == INVALID_HANDLE_VALUE)
|
||||||
|
return;
|
||||||
InfCloseFile(InfHandle);
|
InfCloseFile(InfHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,6 +60,9 @@ SetupFindFirstLineW(
|
||||||
PINFCONTEXT pContext;
|
PINFCONTEXT pContext;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
||||||
|
if (InfHandle == INVALID_HANDLE_VALUE)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
ret = InfFindFirstLine(InfHandle, Section, Key, &pContext);
|
ret = InfFindFirstLine(InfHandle, Section, Key, &pContext);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue