comctl32/listview: Handle DPA_SetPtr() failure (Coverity).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-04-08 16:56:40 +03:00 committed by Alexandre Julliard
parent 87bc2aa607
commit f5ca9b9104
1 changed files with 5 additions and 1 deletions

View File

@ -3123,7 +3123,11 @@ static RANGES ranges_clone(RANGES ranges)
RANGE *newrng = Alloc(sizeof(RANGE));
if (!newrng) goto fail;
*newrng = *((RANGE*)DPA_GetPtr(ranges->hdpa, i));
DPA_SetPtr(clone->hdpa, i, newrng);
if (!DPA_SetPtr(clone->hdpa, i, newrng))
{
Free(newrng);
goto fail;
}
}
return clone;