setupapi: Fix HeapFree of wrong pointer (found by Smatch).
This commit is contained in:
parent
1fbedd92d4
commit
d7abb09b46
|
@ -86,7 +86,7 @@ StringTableInitialize(VOID)
|
||||||
pStringTable->pSlots = MyMalloc(sizeof(TABLE_SLOT) * TABLE_DEFAULT_SIZE);
|
pStringTable->pSlots = MyMalloc(sizeof(TABLE_SLOT) * TABLE_DEFAULT_SIZE);
|
||||||
if (pStringTable->pSlots == NULL)
|
if (pStringTable->pSlots == NULL)
|
||||||
{
|
{
|
||||||
MyFree(pStringTable->pSlots);
|
MyFree(pStringTable);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ StringTableInitializeEx(DWORD dwMaxExtraDataSize,
|
||||||
pStringTable->pSlots = MyMalloc(sizeof(TABLE_SLOT) * TABLE_DEFAULT_SIZE);
|
pStringTable->pSlots = MyMalloc(sizeof(TABLE_SLOT) * TABLE_DEFAULT_SIZE);
|
||||||
if (pStringTable->pSlots == NULL)
|
if (pStringTable->pSlots == NULL)
|
||||||
{
|
{
|
||||||
MyFree(pStringTable->pSlots);
|
MyFree(pStringTable);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue