https://github.com/python/cpython/commit/3a728e5f93c1e4c125406eeeb76d5df1c1726409
commit: 3a728e5f93c1e4c125406eeeb76d5df1c1726409
branch: main
author: Pablo Galindo Salgado <[email protected]>
committer: pablogsal <[email protected]>
date: 2025-12-27T13:38:11Z
summary:
gh-131591: Do not free page caches that weren't allocated (#143205)
files:
M Python/remote_debug.h
diff --git a/Python/remote_debug.h b/Python/remote_debug.h
index d9c5c480fe9a86..dba6da3bad4197 100644
--- a/Python/remote_debug.h
+++ b/Python/remote_debug.h
@@ -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;
}
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]