diff --git a/src/os/win32/host-lib.c b/src/os/win32/host-lib.c index bdc0e6c91d..e1219c9d8b 100644 --- a/src/os/win32/host-lib.c +++ b/src/os/win32/host-lib.c @@ -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++) {