]> granicus.if.org Git - php/commitdiff
- Fix #55301 (com_dotnet part) check if malloc succeded
authorPierre Joye <pajoye@php.net>
Thu, 28 Jul 2011 10:34:16 +0000 (10:34 +0000)
committerPierre Joye <pajoye@php.net>
Thu, 28 Jul 2011 10:34:16 +0000 (10:34 +0000)
ext/com_dotnet/com_dotnet.c

index 0cb30b04a951f8bbbd381efdbcd28c5e45283ddc..acbd3979a8dbaa4d7723b5ef5c896322e0335feb 100644 (file)
@@ -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";