From d7abb09b465097f1bd5b063d78f8d3fcc57c669f Mon Sep 17 00:00:00 2001 From: Lionel Debroux Date: Thu, 6 Sep 2007 11:32:44 +0200 Subject: [PATCH] setupapi: Fix HeapFree of wrong pointer (found by Smatch). --- dlls/setupapi/stringtable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/setupapi/stringtable.c b/dlls/setupapi/stringtable.c index 7be6b1880f2..985e7779501 100644 --- a/dlls/setupapi/stringtable.c +++ b/dlls/setupapi/stringtable.c @@ -86,7 +86,7 @@ StringTableInitialize(VOID) pStringTable->pSlots = MyMalloc(sizeof(TABLE_SLOT) * TABLE_DEFAULT_SIZE); if (pStringTable->pSlots == NULL) { - MyFree(pStringTable->pSlots); + MyFree(pStringTable); return NULL; } @@ -131,7 +131,7 @@ StringTableInitializeEx(DWORD dwMaxExtraDataSize, pStringTable->pSlots = MyMalloc(sizeof(TABLE_SLOT) * TABLE_DEFAULT_SIZE); if (pStringTable->pSlots == NULL) { - MyFree(pStringTable->pSlots); + MyFree(pStringTable); return NULL; }