mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 05:53:34 +08:00
[USETUP] Check for invalid INF handles before doing operations.
This commit is contained in:
parent
34e9290821
commit
9f1c8ac020
@ -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 New Issue
Block a user