From 582c2fa8685efdf6315f7ab6467d7e99de1f3156 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Thu, 28 Jul 2011 10:34:16 +0000 Subject: [PATCH] - Fix #55301 (com_dotnet part) check if malloc succeded --- ext/com_dotnet/com_dotnet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/com_dotnet/com_dotnet.c b/ext/com_dotnet/com_dotnet.c index 06291ab57d..7c206f6295 100644 --- a/ext/com_dotnet/com_dotnet.c +++ b/ext/com_dotnet/com_dotnet.c @@ -129,6 +129,9 @@ static HRESULT dotnet_init(char **p_where TSRMLS_DC) char *where = ""; stuff = malloc(sizeof(*stuff)); + if (!stuff) { + return S_FALSE; + } memset(stuff, 0, sizeof(*stuff)); where = "CoCreateInstance"; -- 2.50.1