mirror of
https://github.com/reactos/reactos.git
synced 2024-07-29 15:49:03 +00:00
fix possible memory leak
svn path=/trunk/; revision=22136
This commit is contained in:
parent
5db3f178ac
commit
53d25231b3
|
@ -347,6 +347,8 @@ int WINAPI WinMain(HINSTANCE hInstance,
|
|||
pScrSht = HeapAlloc(GetProcessHeap(),
|
||||
0,
|
||||
sizeof(SCREENSHOT));
|
||||
if (pScrSht == NULL)
|
||||
return -1;
|
||||
|
||||
if (bFullScreen)
|
||||
{
|
||||
|
@ -358,7 +360,13 @@ int WINAPI WinMain(HINSTANCE hInstance,
|
|||
}
|
||||
|
||||
if (pScrSht->hSelf == NULL)
|
||||
{
|
||||
HeapFree(GetProcessHeap(),
|
||||
0,
|
||||
pScrSht);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (CaptureScreen(pScrSht))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue