Skip to content

Commit f819a28

Browse files
author
pajoye
committed
- Fix #55301 (com_dotnet part) check if malloc succeded
git-svn-id: http://svn.php.net/repository/php/php-src/trunk@313827 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent ade6512 commit f819a28

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/com_dotnet/com_dotnet.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ static HRESULT dotnet_init(char **p_where TSRMLS_DC)
129129
char *where = "";
130130

131131
stuff = malloc(sizeof(*stuff));
132+
if (!stuff) {
133+
return S_FALSE;
134+
}
132135
memset(stuff, 0, sizeof(*stuff));
133136

134137
where = "CoCreateInstance";

0 commit comments

Comments
 (0)