Fix memory leak in OleDuplicateData on error path (found by Smatch).
This commit is contained in:
parent
11f2cb1877
commit
1571df5722
|
@ -259,8 +259,7 @@ HANDLE WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat,
|
|||
if (!size) return NULL;
|
||||
bm.bmBits = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
if (!bm.bmBits) return NULL;
|
||||
if (!GetBitmapBits(hSrc, size, bm.bmBits))
|
||||
return NULL;
|
||||
if (GetBitmapBits(hSrc, size, bm.bmBits))
|
||||
hDst = CreateBitmapIndirect(&bm);
|
||||
HeapFree(GetProcessHeap(), 0, bm.bmBits);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue