Skip to content

Commit

Permalink
comctl32: Fix a leak on error path (Coverity).
Browse files Browse the repository at this point in the history
  • Loading branch information
nsivov authored and julliard committed Mar 25, 2014
1 parent 61a92af commit d60910f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dlls/comctl32/dpa.c
Expand Up @@ -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;
Expand Down

0 comments on commit d60910f

Please sign in to comment.