]> 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 06291ab57dbf424181c356f4a283c1c74d5e689a..7c206f62953fcffe0656354089342e3f5d825853 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";