From c0f3fb5e19db8cb755cf425d12e946b384a4863d Mon Sep 17 00:00:00 2001 From: Oldes Huhuman Date: Tue, 4 Jun 2024 17:41:51 +0200 Subject: [PATCH] FIX: warning that `malloc` might return null pointer --- src/os/win32/host-lib.c | 1 + 1 file changed, 1 insertion(+) 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++) {