summaryrefslogtreecommitdiff
path: root/pith/state.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2016-02-28 23:53:52 -0700
committerEduardo Chappa <chappa@washington.edu>2016-02-28 23:53:52 -0700
commit0bb3a0be1d23f86b4741102d3ea2c9fc4ef4b5af (patch)
tree51a2d8d59de4e0fb1a4abc3dcdca6c2db6f8e492 /pith/state.c
parentf79d3985bcf67ed2c0893c4a41fa8b7b1736a02a (diff)
downloadalpine-0bb3a0be1d23f86b4741102d3ea2c9fc4ef4b5af.tar.xz
* Changes to make Alpine build when PASSFILE is not specified and
adding memory freeing calls when necessary.
Diffstat (limited to 'pith/state.c')
-rw-r--r--pith/state.c31
1 files changed, 25 insertions, 6 deletions
diff --git a/pith/state.c b/pith/state.c
index d4b8c092..6ac569c3 100644
--- a/pith/state.c
+++ b/pith/state.c
@@ -178,10 +178,10 @@ free_pine_struct(struct pine **pps)
if((*pps)->posting_charmap)
fs_give((void **)&(*pps)->posting_charmap);
-#ifdef PASSFILE
- if((*pps)->passfile)
- fs_give((void **)&(*pps)->passfile);
#ifdef SMIME
+ if((*pps)->pwdcertdir)
+ fs_give((void **)&(*pps)->pwdcertdir);
+
if((*pps)->pwdcert){
PERSONAL_CERT *pc;
@@ -189,9 +189,28 @@ free_pine_struct(struct pine **pps)
free_personal_certs(&pc);
(*pps)->pwdcert = NULL;
}
- if((*pps)->pwdcertdir)
- fs_give((void **)&(*pps)->pwdcertdir);
-#endif /* SMIME inside PASSFILE */
+
+ if((*pps)->pwdcertlist){
+ CertList *cert;
+
+ cert = (CertList *) (*pps)->pwdcertlist;
+ free_certlist(&cert);
+ (*pps)->pwdcertlist = NULL;
+ }
+
+ if((*pps)->backuppassword){
+ CertList *cert;
+
+ cert = (CertList *) (*pps)->backuppassword;
+ free_certlist(&cert);
+ (*pps)->backuppassword = NULL;
+ }
+#endif /* SMIME */
+
+
+#ifdef PASSFILE
+ if((*pps)->passfile)
+ fs_give((void **)&(*pps)->passfile);
#endif /* PASSFILE */
if((*pps)->hdr_colors)