Commit d62b48df authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

setupapi: Do not cast NULL.

parent 87785a2d
......@@ -342,14 +342,14 @@ StringTableDuplicate(HSTRING_TABLE hStringTable)
if (pSourceTable == NULL)
{
ERR("Invalid hStringTable!\n");
return (HSTRING_TABLE)NULL;
return NULL;
}
pDestinationTable = MyMalloc(sizeof(STRING_TABLE));
if (pDestinationTable == NULL)
{
ERR("Could not allocate a new string table!\n");
return (HSTRING_TABLE)NULL;
return NULL;
}
memset(pDestinationTable, 0, sizeof(STRING_TABLE));
......@@ -358,7 +358,7 @@ StringTableDuplicate(HSTRING_TABLE hStringTable)
if (pDestinationTable->pSlots == NULL)
{
MyFree(pDestinationTable);
return (HSTRING_TABLE)NULL;
return NULL;
}
memset(pDestinationTable->pSlots, 0, sizeof(TABLE_SLOT) * pSourceTable->dwMaxSlots);
......
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