Skip to content

Commit 978445b

Browse files
committed
Increment Py_None refcount for NULL array elements
Per bug #5835 by Julien Demoor Author: Alex Hunsaker
1 parent 08af45f commit 978445b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/pl/plpython/plpython.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,10 @@ PLyList_FromArray(PLyDatumToOb *arg, Datum d)
20432043
elm->typlen, elm->typbyval, elm->typalign,
20442044
&isnull);
20452045
if (isnull)
2046+
{
2047+
Py_INCREF(Py_None);
20462048
PyList_SET_ITEM(list, i, Py_None);
2049+
}
20472050
else
20482051
PyList_SET_ITEM(list, i, elm->func(elm, elem));
20492052
}

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