Module: wine Branch: master Commit: d7abb09b465097f1bd5b063d78f8d3fcc57c669f URL: http://source.winehq.org/git/wine.git/?a=commit;h=d7abb09b465097f1bd5b063d78...
Author: Lionel Debroux lionel_debroux@yahoo.fr Date: Thu Sep 6 11:32:44 2007 +0200
setupapi: Fix HeapFree of wrong pointer (found by Smatch).
---
dlls/setupapi/stringtable.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/setupapi/stringtable.c b/dlls/setupapi/stringtable.c index 7be6b18..985e777 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; }