Skip to content

Commit 1c249fc

Browse files
committed
Fix PL/Python memory leak involving array slices
Report and patch from Daniel Popowich, bug #5842 (with some debugging help from Alex Hunsaker)
1 parent 8c0a5eb commit 1c249fc

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/pl/plpython/plpython.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3201,14 +3201,9 @@ PLy_result_ass_item(PyObject *arg, Py_ssize_t idx, PyObject *item)
32013201
static PyObject *
32023202
PLy_result_slice(PyObject *arg, Py_ssize_t lidx, Py_ssize_t hidx)
32033203
{
3204-
PyObject *rv;
32053204
PLyResultObject *ob = (PLyResultObject *) arg;
32063205

3207-
rv = PyList_GetSlice(ob->rows, lidx, hidx);
3208-
if (rv == NULL)
3209-
return NULL;
3210-
Py_INCREF(rv);
3211-
return rv;
3206+
return PyList_GetSlice(ob->rows, lidx, hidx);
32123207
}
32133208

32143209
static int

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy