mirror of
https://github.com/python/cpython.git
synced 2026-01-26 21:03:34 +00:00
gh-131719: add NULL pointer check to _PyMem_FreeDelayed (gh-131720)
This commit is contained in:
parent
44605aa93d
commit
0a91456ad1
@ -0,0 +1 @@
|
||||
Fix missing NULL check in ``_PyMem_FreeDelayed`` in :term:`free-threaded <free threading>` build.
|
||||
@ -1215,7 +1215,9 @@ void
|
||||
_PyMem_FreeDelayed(void *ptr)
|
||||
{
|
||||
assert(!((uintptr_t)ptr & 0x01));
|
||||
free_delayed((uintptr_t)ptr);
|
||||
if (ptr != NULL) {
|
||||
free_delayed((uintptr_t)ptr);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Py_GIL_DISABLED
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user