summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/listobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 533ee74..d3bc576 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -1548,8 +1548,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.