Mercurial > cpython-lru_cache-weakref
diff Modules/linuxaudiodev.c @ 14351:ef978520085f legacy-trunk
Move the Py_DECREF(x) after the error: label so that we don't leak x
when PyDict_SetItemString() fails.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 01 Sep 2000 15:35:12 +0000 |
| parents | 5397fdf88ec2 |
| children | 675748378c81 |
line wrap: on
line diff
--- a/Modules/linuxaudiodev.c Fri Sep 01 13:41:37 2000 +0000 +++ b/Modules/linuxaudiodev.c Fri Sep 01 15:35:12 2000 +0000 @@ -440,8 +440,8 @@ 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; }
