From 529e552be4b20c1545051ac6a192d61350e7c2e1 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Tue, 8 Jan 2019 13:52:28 +0100 Subject: BUG: Fix leak of void scalar buffer info The vois scalar was missing the clearing logic for the buffer info cache (or storage). It should maybe be checked whether we can replace all of this logic when not supporting Python 2 anymore. --- numpy/core/src/multiarray/scalartypes.c.src | 2 ++ 1 file changed, 2 insertions(+) (limited to 'numpy') diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src index 2f71c8ae9..52de31289 100644 --- a/numpy/core/src/multiarray/scalartypes.c.src +++ b/numpy/core/src/multiarray/scalartypes.c.src @@ -2599,6 +2599,8 @@ NPY_NO_EXPORT PyTypeObject PyGenericArrType_Type = { static void void_dealloc(PyVoidScalarObject *v) { + _dealloc_cached_buffer_info((PyObject *)v); + if (v->flags & NPY_ARRAY_OWNDATA) { npy_free_cache(v->obval, Py_SIZE(v)); } -- cgit v1.2.1