summaryrefslogtreecommitdiff
path: root/Modules/linuxaudiodev.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-09-01 15:35:12 +0000
committerGuido van Rossum <guido@python.org>2000-09-01 15:35:12 +0000
commitca0ae0528f4280a0647362c5d223a91a68ecc2bb (patch)
tree6728c86da80f3e036ef2e1f69c00477859f0dabb /Modules/linuxaudiodev.c
parente098bc181fefb33f4331fdb40641a30ed1e7c087 (diff)
downloadcpython-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.c2
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;
}