https://src.fedoraproject.org/rpms/python-wxpython4/c/46eb04f8ac5674968bfa3def439a67a39301024e From 9540ec1682a0f12e9634a0f087af8b85af45e547 Mon Sep 17 00:00:00 2001 From: Phil Thompson Date: Mon, 26 Jun 2023 15:04:53 +0200 Subject: [PATCH] sipMalloc() and sipFree() are now implemented using PyMem_RawMalloc() and PyMem_RawFree() so that they should be safe to call from functions registered with Py_AtExit(). --- sip/siplib/siplib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sip/siplib/siplib.c b/sip/siplib/siplib.c index 95563e5c..d4003e9f 100644 --- a/sip/siplib/siplib.c +++ b/sip/siplib/siplib.c @@ -2147,7 +2147,7 @@ void *sip_api_malloc(size_t nbytes) { void *mem; - if ((mem = PyMem_Malloc(nbytes)) == NULL) + if ((mem = PyMem_RawMalloc(nbytes)) == NULL) PyErr_NoMemory(); return mem; @@ -2159,7 +2159,7 @@ void *sip_api_malloc(size_t nbytes) */ void sip_api_free(void *mem) { - PyMem_Free(mem); + PyMem_RawFree(mem); } -- 2.40.1