Commit 42f742e1 authored by Thomas Faber's avatar Thomas Faber Committed by Alexandre Julliard

ntdll: Handle RtlReAllocateHeap failure in com_class_add_progid (Coverity).

parent cf629f7e
......@@ -1453,8 +1453,11 @@ static BOOL com_class_add_progid(const xmlstr_t *progid, struct entity *entity)
if (progids->allocated == progids->num)
{
WCHAR **new_progids = RtlReAllocateHeap(GetProcessHeap(), 0, progids->progids,
2 * progids->allocated * sizeof(WCHAR*));
if (!new_progids) return FALSE;
progids->allocated *= 2;
progids->progids = RtlReAllocateHeap(GetProcessHeap(), 0, progids->progids, progids->allocated * sizeof(WCHAR*));
progids->progids = new_progids;
}
if (!(progids->progids[progids->num] = xmlstrdupW(progid))) return FALSE;
......
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