[Python-checkins] cpython: fix refleak in the error case
benjamin.peterson
python-checkins at python.org
Mon Jan 13 15:21:13 CET 2014
http://hg.python.org/cpython/rev/bbfef8dc0e91
changeset: 88437:bbfef8dc0e91
user: Benjamin Peterson <benjamin at python.org>
date: Mon Jan 13 09:20:53 2014 -0500
summary:
fix refleak in the error case
files:
Modules/audioop.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Modules/audioop.c b/Modules/audioop.c
--- a/Modules/audioop.c
+++ b/Modules/audioop.c
@@ -1505,7 +1505,7 @@
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 @@
bufferstep = !bufferstep;
}
rv = Py_BuildValue("(O(ii))", str, valpred, index);
- Py_DECREF(str);
exit:
+ Py_XDECREF(str);
PyBuffer_Release(&view);
return rv;
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list