From d60910fc149d49639b4e8d077f0bb1099cf8016f Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 24 Mar 2014 21:35:02 +0400 Subject: [PATCH] comctl32: Fix a leak on error path (Coverity). --- dlls/comctl32/dpa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/dpa.c b/dlls/comctl32/dpa.c index 41fb799d176d..148d3f10a023 100644 --- a/dlls/comctl32/dpa.c +++ b/dlls/comctl32/dpa.c @@ -129,8 +129,10 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, PFNDPASTREAM loadProc, if (!hDpa) return E_OUTOFMEMORY; - if (!DPA_Grow (hDpa, streamData.dwItems)) + if (!DPA_Grow (hDpa, streamData.dwItems)) { + DPA_Destroy (hDpa); return E_OUTOFMEMORY; + } /* load data from the stream into the dpa */ ptr = hDpa->ptrs;