free the copy of the command-line.
Found using Clang's static analyzer.
Core and Builtins
-----------------
+- Fix a (most likely) very rare memory leak when calling main() and not being
+ able to decode a command-line argument.
+
- Issue #14815: Use Py_ssize_t instead of long for the object hash, to
preserve all 64 bits of hash on Win64.
argv_copy[i] = _Py_char2wchar(argv[i], NULL);
#endif
if (!argv_copy[i]) {
+ free(oldloc);
fprintf(stderr, "Fatal Python error: "
"unable to decode the command line argument #%i\n",
i + 1);