mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +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(
|
||||
IN HINF InfHandle)
|
||||
{
|
||||
if (InfHandle == INVALID_HANDLE_VALUE)
|
||||
return;
|
||||
InfCloseFile(InfHandle);
|
||||
}
|
||||
|
||||
|
@ -58,6 +60,9 @@ SetupFindFirstLineW(
|
|||
PINFCONTEXT pContext;
|
||||
BOOL ret;
|
||||
|
||||
if (InfHandle == INVALID_HANDLE_VALUE)
|
||||
return FALSE;
|
||||
|
||||
ret = InfFindFirstLine(InfHandle, Section, Key, &pContext);
|
||||
if (!ret)
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue