Mercurial > cpython-lru_cache-weakref
diff Modules/python.c @ 77782:f77998006917
If main() is called and an argument cannot be decoded, make sure to
free the copy of the command-line.
Found using Clang's static analyzer.
| author | Brett Cannon <brett@python.org> |
|---|---|
| date | Mon, 25 Jun 2012 16:25:28 -0400 |
| parents | c0900fd6e4b3 |
| children | 26c4748351cb 48fbdaf3a849 |
line wrap: on
line diff
--- a/Modules/python.c Mon Jun 25 16:13:44 2012 -0400 +++ b/Modules/python.c Mon Jun 25 16:25:28 2012 -0400 @@ -51,6 +51,7 @@ 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);
