Skip to content

Commit 582c2fa

Browse files
committed
- Fix #55301 (com_dotnet part) check if malloc succeded
1 parent 103d475 commit 582c2fa

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)