From f4de98290f72727abca7211328c76a30115ebb27 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Fri, 16 May 2008 16:13:04 +0000 Subject: [PATCH] Check if memory was goodly allocated and zero it before use svn path=/trunk/; revision=33540 --- rosapps/downloader/download.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rosapps/downloader/download.c b/rosapps/downloader/download.c index 44059ebca2c..7a523d2561e 100644 --- a/rosapps/downloader/download.c +++ b/rosapps/downloader/download.c @@ -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; -- 2.17.1