summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-01-13 14:20:53 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-01-13 14:20:53 (GMT)
commita51791aa94882742c2b618ed27bca72125f61eed (patch)
tree651712575bf02f6ec84d60965c2fb8bed0764785 /Modules
parent676bf737935a9e240178f23dea9843242a11779e (diff)
downloadcpython-a51791aa94882742c2b618ed27bca72125f61eed.zip
cpython-a51791aa94882742c2b618ed27bca72125f61eed.tar.gz
cpython-a51791aa94882742c2b618ed27bca72125f61eed.tar.bz2
fix refleak in the error case
Diffstat (limited to 'Modules')
-rw-r--r--Modules/audioop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/audioop.c b/Modules/audioop.c
index bae4f26..f8bb18a 100644
--- a/Modules/audioop.c
+++ b/Modules/audioop.c
@@ -1505,7 +1505,7 @@ audioop_lin2adpcm(PyObject *self, PyObject *args)
Py_ssize_t i;
int size, step, valpred, delta,
index, sign, vpdiff, diff;
- PyObject *rv = NULL, *state, *str;
+ PyObject *rv = NULL, *state, *str = NULL;
int outputbuffer = 0, bufferstep;
if (!PyArg_ParseTuple(args, "y*iO:lin2adpcm",
@@ -1605,8 +1605,8 @@ audioop_lin2adpcm(PyObject *self, PyObject *args)
bufferstep = !bufferstep;
}
rv = Py_BuildValue("(O(ii))", str, valpred, index);
- Py_DECREF(str);
exit:
+ Py_XDECREF(str);
PyBuffer_Release(&view);
return rv;
}