Commit 7c554042 authored by Guido van Rossum's avatar Guido van Rossum

Move the Py_DECREF(x) after the error: label so that we don't leak x

when PyDict_SetItemString() fails.
parent 1688f378
......@@ -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;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment