fix refleak in the error case
This commit is contained in:
parent
676bf73793
commit
a51791aa94
|
@ -1505,7 +1505,7 @@ audioop_lin2adpcm(PyObject *self, PyObject *args)
|
||||||
Py_ssize_t i;
|
Py_ssize_t i;
|
||||||
int size, step, valpred, delta,
|
int size, step, valpred, delta,
|
||||||
index, sign, vpdiff, diff;
|
index, sign, vpdiff, diff;
|
||||||
PyObject *rv = NULL, *state, *str;
|
PyObject *rv = NULL, *state, *str = NULL;
|
||||||
int outputbuffer = 0, bufferstep;
|
int outputbuffer = 0, bufferstep;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "y*iO:lin2adpcm",
|
if (!PyArg_ParseTuple(args, "y*iO:lin2adpcm",
|
||||||
|
@ -1605,8 +1605,8 @@ audioop_lin2adpcm(PyObject *self, PyObject *args)
|
||||||
bufferstep = !bufferstep;
|
bufferstep = !bufferstep;
|
||||||
}
|
}
|
||||||
rv = Py_BuildValue("(O(ii))", str, valpred, index);
|
rv = Py_BuildValue("(O(ii))", str, valpred, index);
|
||||||
Py_DECREF(str);
|
|
||||||
exit:
|
exit:
|
||||||
|
Py_XDECREF(str);
|
||||||
PyBuffer_Release(&view);
|
PyBuffer_Release(&view);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue