From 5e8a3f038a79221b43135e3a54ac7b997911e496 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Sat, 20 Dec 2025 18:43:09 +0000 Subject: [PATCH] CalmaWrite: fix: introduced memory leak, missed free Appears the 'listtop' is a sentinal/entryexit value to a circular list My recent patch does not copy original behaviour in freeing this list entry (as well as the reset of the list). --- calma/CalmaWrite.c | 1 + calma/CalmaWriteZ.c | 1 + 2 files changed, 2 insertions(+) diff --git a/calma/CalmaWrite.c b/calma/CalmaWrite.c index 9009e1fd..b5446193 100644 --- a/calma/CalmaWrite.c +++ b/calma/CalmaWrite.c @@ -2432,6 +2432,7 @@ calmaProcessBoundary( freeMagic1(&mm1, lbref); lbref = lbref->lb_next; } + freeMagic1(&mm1, lbref); freeMagic1_end(&mm1); } } diff --git a/calma/CalmaWriteZ.c b/calma/CalmaWriteZ.c index 11221e67..554fe761 100644 --- a/calma/CalmaWriteZ.c +++ b/calma/CalmaWriteZ.c @@ -1867,6 +1867,7 @@ calmaProcessBoundaryZ( freeMagic1(&mm1, lbref); lbref = lbref->lb_next; } + freeMagic1(&mm1, lbref); freeMagic1_end(&mm1); } }