Skip to content

Commit c0f3fb5

Browse files
committed
FIX: warning that malloc might return null pointer
1 parent 338cdd9 commit c0f3fb5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/os/win32/host-lib.c

+1
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,7 @@ void Dispose_Windows(void);
10231023
len += wcslen(argv[n]) + 1;
10241024
}
10251025
cmd = cast(wchar_t*, malloc(len * sizeof(wchar_t)));
1026+
if (cmd == NULL) goto cleanup;
10261027
cmd[0] = L'\0';
10271028
// construct the command line
10281029
for (int n = 0; n < argc; n++) {

0 commit comments

Comments
 (0)