mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
Check return value of PyList_Append() in Py_Main(). CID 1353200
This commit is contained in:
parent
301edfa579
commit
275270772e
1 changed files with 2 additions and 1 deletions
|
@ -482,7 +482,8 @@ Py_Main(int argc, wchar_t **argv)
|
|||
warning_option = PyUnicode_FromWideChar(_PyOS_optarg, -1);
|
||||
if (warning_option == NULL)
|
||||
Py_FatalError("failure in handling of -W argument");
|
||||
PyList_Append(warning_options, warning_option);
|
||||
if (PyList_Append(warning_options, warning_option) == -1)
|
||||
Py_FatalError("failure in handling of -W argument");
|
||||
Py_DECREF(warning_option);
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue