mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-131591: Do not free page caches that weren't allocated (#143205)
This commit is contained in:
parent
00e24b80e0
commit
3a728e5f93
1 changed files with 3 additions and 1 deletions
|
|
@ -154,7 +154,9 @@ static void
|
|||
_Py_RemoteDebug_FreePageCache(proc_handle_t *handle)
|
||||
{
|
||||
for (int i = 0; i < MAX_PAGES; i++) {
|
||||
PyMem_RawFree(handle->pages[i].data);
|
||||
if (handle->pages[i].data) {
|
||||
PyMem_RawFree(handle->pages[i].data);
|
||||
}
|
||||
handle->pages[i].data = NULL;
|
||||
handle->pages[i].valid = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue