From 19dfafb6bc3ed0d37036f21813b753a4dca91e52 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sat, 16 Jun 2018 00:36:14 -0600 Subject: * Fix freeing history memory, and other changes to make Valgrind happy. --- pith/hist.c | 8 ++++++-- pith/pine.hlp | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'pith') diff --git a/pith/hist.c b/pith/hist.c index bef5598b..8f21b831 100644 --- a/pith/hist.c +++ b/pith/hist.c @@ -50,8 +50,12 @@ free_hist(HISTORY_S **history) if(history && *history){ for(i = 0; i < (*history)->histsize; i++) - if((*history)->hist[i] && (*history)->hist[i]->str) - fs_give((void **) &(*history)->hist[i]->str); + if((*history)->hist[i]){ + if((*history)->hist[i]->str) + fs_give((void **) &(*history)->hist[i]->str); + (*history)->hist[i]->cntxt = NULL; /* taken care of elsewhere */ + fs_give((void **) &(*history)->hist[i]); + } fs_give((void **) history); } diff --git a/pith/pine.hlp b/pith/pine.hlp index cc394f1a..637f2e31 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 285 2018-06-14 16:50:05 +Alpine Commit 286 2018-06-16 00:36:08 ============= h_news ================= -- cgit v1.2.3-70-g09d2