diff options
author | Guido van Rossum <guido@python.org> | 2000-09-01 15:35:12 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-09-01 15:35:12 +0000 |
commit | ca0ae0528f4280a0647362c5d223a91a68ecc2bb (patch) | |
tree | 6728c86da80f3e036ef2e1f69c00477859f0dabb /Modules/linuxaudiodev.c | |
parent | e098bc181fefb33f4331fdb40641a30ed1e7c087 (diff) | |
download | cpython-ca0ae0528f4280a0647362c5d223a91a68ecc2bb.tar.gz |
Move the Py_DECREF(x) after the error: label so that we don't leak x
when PyDict_SetItemString() fails.
Diffstat (limited to 'Modules/linuxaudiodev.c')
-rw-r--r-- | Modules/linuxaudiodev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/linuxaudiodev.c b/Modules/linuxaudiodev.c index 509823ed32..5b18f1606b 100644 --- a/Modules/linuxaudiodev.c +++ b/Modules/linuxaudiodev.c @@ -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; } |