mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
gh-106350: Tkinter: do not ignore return value of mp_init() (GH-106351)
This commit is contained in:
parent
2b1a81e2cf
commit
b5ae7c4984
2 changed files with 5 additions and 2 deletions
|
|
@ -874,8 +874,9 @@ asBignumObj(PyObject *value)
|
|||
return NULL;
|
||||
}
|
||||
hexchars += neg + 2; /* skip sign and "0x" */
|
||||
mp_init(&bigValue);
|
||||
if (mp_read_radix(&bigValue, hexchars, 16) != MP_OKAY) {
|
||||
if (mp_init(&bigValue) != MP_OKAY ||
|
||||
mp_read_radix(&bigValue, hexchars, 16) != MP_OKAY)
|
||||
{
|
||||
mp_clear(&bigValue);
|
||||
Py_DECREF(hexstr);
|
||||
PyErr_NoMemory();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue