summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorstratakis <cstratak@redhat.com>2019-03-04 15:40:25 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-03-04 15:40:25 (GMT)
commit710dcfd2f4bee034894a39026388f9c21ea976f1 (patch)
tree5713ac42d26698df6dabdb07102b29bf7878f0e9 /Modules
parent67988d12ec46c0985e70dd7f6178cf04c2e4fdec (diff)
downloadcpython-710dcfd2f4bee034894a39026388f9c21ea976f1.zip
cpython-710dcfd2f4bee034894a39026388f9c21ea976f1.tar.gz
cpython-710dcfd2f4bee034894a39026388f9c21ea976f1.tar.bz2
[2.7] bpo-13096: Fix memory leak in ctypes POINTER handling of large values (GH-12100)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/callproc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
index 2097342..defcde1 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -1831,6 +1831,7 @@ POINTER(PyObject *self, PyObject *cls)
"s(O){}",
buf,
&PyCPointer_Type);
+ PyMem_Free(buf);
if (result == NULL)
return result;
key = PyLong_FromVoidPtr(result);