##// END OF EJS Templates
xdiff: fix leak in hunk_consumer()...
Yuya Nishihara -
r39484:ad76032d stable
parent child Browse files
Show More
@@ -256,13 +256,12 b' static int hunk_consumer(int64_t a1, int'
256 {
256 {
257 PyObject *rl = (PyObject *)priv;
257 PyObject *rl = (PyObject *)priv;
258 PyObject *m = Py_BuildValue("LLLL", a1, a2, b1, b2);
258 PyObject *m = Py_BuildValue("LLLL", a1, a2, b1, b2);
259 int r;
259 if (!m)
260 if (!m)
260 return -1;
261 return -1;
261 if (PyList_Append(rl, m) != 0) {
262 r = PyList_Append(rl, m);
262 Py_DECREF(m);
263 Py_DECREF(m);
263 return -1;
264 return r;
264 }
265 return 0;
266 }
265 }
267
266
268 static PyObject *xdiffblocks(PyObject *self, PyObject *args)
267 static PyObject *xdiffblocks(PyObject *self, PyObject *args)
General Comments 0
You need to be logged in to leave comments. Login now