Skip to content

Commit

Permalink
FIX: warning that malloc might return null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jun 4, 2024
1 parent 338cdd9 commit c0f3fb5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/os/win32/host-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,7 @@ void Dispose_Windows(void);
len += wcslen(argv[n]) + 1;
}
cmd = cast(wchar_t*, malloc(len * sizeof(wchar_t)));
if (cmd == NULL) goto cleanup;
cmd[0] = L'\0';
// construct the command line
for (int n = 0; n < argc; n++) {
Expand Down

0 comments on commit c0f3fb5

Please sign in to comment.