mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Move the Py_DECREF(x) after the error: label so that we don't leak x
when PyDict_SetItemString() fails.
This commit is contained in:
parent
1688f378cb
commit
7c55404207
1 changed files with 1 additions and 1 deletions
|
@ -440,8 +440,8 @@ initlinuxaudiodev(void)
|
|||
x = PyInt_FromLong((long) AFMT_S16_LE);
|
||||
if (x == NULL || PyDict_SetItemString(d, "AFMT_S16_LE", x) < 0)
|
||||
goto error;
|
||||
Py_DECREF(x);
|
||||
|
||||
error:
|
||||
Py_DECREF(x);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue