mirror of https://github.com/python/cpython
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
|
@ -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…
Reference in New Issue