Skip to content
Snippets Groups Projects
Unverified Commit 96529009 authored by Tim Peters's avatar Tim Peters Committed by GitHub
Browse files

Issues/88027: A potential double free in list_sort_impl (#92367)

merge_freemem(): set keys to NULL do it's harmless to call this again.
parent 85354ed7
No related branches found
No related tags found
No related merge requests found
......@@ -1573,8 +1573,10 @@ static void
merge_freemem(MergeState *ms)
{
assert(ms != NULL);
if (ms->a.keys != ms->temparray)
if (ms->a.keys != ms->temparray) {
PyMem_Free(ms->a.keys);
ms->a.keys = NULL;
}
}
/* Ensure enough temp memory for 'need' array slots is available.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment