Skip to content

Commit

Permalink
fix skipped initialization errors with /permissive- (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug committed Apr 25, 2024
1 parent 9ccb72e commit c6a4022
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions intercept/mdapi/DriverStorePath.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ static bool GetIntelDriverStoreFullPath(
unsigned long* pDriverStorePathLengthInCharacters)
{
bool result = false;
unsigned long deviceIndex = 0;
unsigned long interfaceIndex = 0;
unsigned long driverStorePathLengthInCharacters = 0;

// allocated memory must be freed with delete operation
unsigned char* pPropertyInfName = NULL;
// allocated memory must be freed with delete operation
Expand All @@ -112,15 +116,12 @@ static bool GetIntelDriverStoreFullPath(
goto END;
}

unsigned long deviceIndex = 0;
SP_DEVINFO_DATA devInfoData;
ZeroMemory(&devInfoData, sizeof(SP_DEVINFO_DATA));
unsigned long interfaceIndex = 0;
SP_DEVICE_INTERFACE_DATA deviceInterfaceData;
ZeroMemory(&deviceInterfaceData, sizeof(SP_DEVICE_INTERFACE_DATA));
DEVPROPKEY devPropKey;
ZeroMemory(&devPropKey, sizeof(DEVPROPKEY));
unsigned long driverStorePathLengthInCharacters = 0;

// enumerate display adapters
while (true)
Expand Down

0 comments on commit c6a4022

Please sign in to comment.