We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec1c5cc commit 977188cCopy full SHA for 977188c
1 file changed
peps/pep-0788.rst
@@ -861,13 +861,14 @@ deadlock the interpreter if it's not released.
861
{
862
// Weak reference to the interpreter. It won't wait on the callback
863
// to finalize.
864
- ThreadData *tdata = PyMem_Malloc(sizeof(ThreadData));
+ ThreadData *tdata = PyMem_RawMalloc(sizeof(ThreadData));
865
if (tdata == NULL) {
866
PyErr_NoMemory();
867
return NULL;
868
}
869
PyInterpreterWeakRef wref;
870
if (PyInterpreterWeakRef_Get(&wref) < 0) {
871
+ PyMem_RawFree(tdata);
872
873
874
tdata->wref = wref;
0 commit comments