projects
/
users
/
hanada
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08fc2d4
)
Fix PL/Python memory leak involving array slices
author
Alvaro Herrera
<
[email protected]
>
Thu, 17 Mar 2011 15:28:46 +0000
(12:28 -0300)
committer
Alvaro Herrera
<
[email protected]
>
Thu, 17 Mar 2011 15:33:25 +0000
(12:33 -0300)
Report and patch from Daniel Popowich, bug #5842
(with some debugging help from Alex Hunsaker)
src/pl/plpython/plpython.c
patch
|
blob
|
blame
|
history
diff --git
a/src/pl/plpython/plpython.c
b/src/pl/plpython/plpython.c
index 79203f1c0e0f798fb8108bbfb67a7808d5f3c5ab..d126d875e58765316762f7f23bd07c005b0c42aa 100644
(file)
--- a/
src/pl/plpython/plpython.c
+++ b/
src/pl/plpython/plpython.c
@@
-2328,14
+2328,9
@@
PLy_result_ass_item(PyObject *arg, Py_ssize_t idx, PyObject *item)
static PyObject *
PLy_result_slice(PyObject *arg, Py_ssize_t lidx, Py_ssize_t hidx)
{
- PyObject *rv;
PLyResultObject *ob = (PLyResultObject *) arg;
- rv = PyList_GetSlice(ob->rows, lidx, hidx);
- if (rv == NULL)
- return NULL;
- Py_INCREF(rv);
- return rv;
+ return PyList_GetSlice(ob->rows, lidx, hidx);
}
static int