From 0bb3a0be1d23f86b4741102d3ea2c9fc4ef4b5af Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sun, 28 Feb 2016 23:53:52 -0700 Subject: * Changes to make Alpine build when PASSFILE is not specified and adding memory freeing calls when necessary. --- pith/state.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'pith/state.c') 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) -- cgit v1.2.3-54-g00ecf