Check if memory was goodly allocated and zero it before use

svn path=/trunk/; revision=33540
This commit is contained in:
Pierre Schweitzer 2008-05-16 16:13:04 +00:00
parent 3195cffc1f
commit f4de98290f

View file

@ -207,6 +207,10 @@ CreateDl(HWND Dlg, BOOL *pbCancelled)
IBindStatusCallbackImpl *This;
This = HeapAlloc(GetProcessHeap(), 0, sizeof(IBindStatusCallbackImpl));
if (!This)
return NULL;
ZeroMemory(This, sizeof(IBindStatusCallbackImpl));
This->vtbl = &dlVtbl;
This->ref = 1;
This->hDialog = Dlg;