ntdll: Handle RtlReAllocateHeap failure in com_class_add_progid (Coverity).
Signed-off-by: Thomas Faber <thomas.faber@reactos.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cf629f7edd
commit
42f742e1be
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue