summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2011-07-28 10:34:16 +0000
committerPierre Joye <pajoye@php.net>2011-07-28 10:34:16 +0000
commit0c715414e0484234b4e7bce855b66df28b293299 (patch)
tree60648983b94de7b9506552a1f66c5217929addbc
parent40b059de97252888ac7eae0131bb1c0e30cc1de4 (diff)
downloadphp-git-0c715414e0484234b4e7bce855b66df28b293299.tar.gz
- Fix #55301 (com_dotnet part) check if malloc succeded
-rw-r--r--ext/com_dotnet/com_dotnet.c3
1 files changed, 3 insertions, 0 deletions
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";