Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
raphasampaio committed Nov 21, 2024
1 parent 40997d0 commit eef9e67
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/embedding_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int wmain(int argc, wchar_t *wargv[], wchar_t *envp[]) {
wchar_t *warg = wargv[i];
size_t len = WideCharToMultiByte(CP_UTF8, 0, warg, -1, NULL, 0, NULL, NULL);
if (!len) return 1;
char *arg = (char*)alloca(len);
char *arg = (char*)malloc(len);
if (!WideCharToMultiByte(CP_UTF8, 0, warg, -1, arg, len, NULL, NULL)) return 1;
argv[i] = arg;
}
Expand Down Expand Up @@ -147,10 +147,6 @@ int main(int argc, char *argv[]) {
}

// Cleanup and gracefully exit
#ifdef _WIN32
for (int i = 0; i < argc; i++) free(argv[i]);
free(argv);
#endif
free(exe_path);
jl_atexit_hook(retcode);
return retcode;
Expand Down

0 comments on commit eef9e67

Please sign in to comment.