summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-06-16 00:36:14 -0600
committerEduardo Chappa <chappa@washington.edu>2018-06-16 00:36:14 -0600
commit19dfafb6bc3ed0d37036f21813b753a4dca91e52 (patch)
tree72ee32d9026dae4d1afb6e349f00375f9f207afe /pith
parent6fc06defd55e7d00f620d40e52da47bc4c1b3a96 (diff)
downloadalpine-19dfafb6bc3ed0d37036f21813b753a4dca91e52.tar.xz
* Fix freeing history memory, and other changes to make Valgrind happy.
Diffstat (limited to 'pith')
-rw-r--r--pith/hist.c8
-rw-r--r--pith/pine.hlp2
2 files changed, 7 insertions, 3 deletions
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 =================
<HTML>
<HEAD>