mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-131719: add NULL pointer check to _PyMem_FreeDelayed
(gh-131720)
This commit is contained in:
parent
44605aa93d
commit
0a91456ad1
2 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue