fix possible memory leak

svn path=/trunk/; revision=22136
This commit is contained in:
Ged Murphy 2006-05-31 22:39:51 +00:00
parent 5db3f178ac
commit 53d25231b3

View file

@ -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))
{