Module: wine Branch: master Commit: f5ca9b91046f43410934ddf872bf4504cd9e9fe1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f5ca9b91046f43410934ddf872...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Fri Apr 8 16:56:40 2016 +0300
comctl32/listview: Handle DPA_SetPtr() failure (Coverity).
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/comctl32/listview.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index b467b36..758b640 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -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;