Commit d7abb09b authored by Lionel Debroux's avatar Lionel Debroux Committed by Alexandre Julliard

setupapi: Fix HeapFree of wrong pointer (found by Smatch).

parent 1fbedd92
...@@ -86,7 +86,7 @@ StringTableInitialize(VOID) ...@@ -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, ...@@ -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;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment