summaryrefslogtreecommitdiff
path: root/alpine/alpine.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2021-08-23 21:16:46 -0600
committerEduardo Chappa <chappa@washington.edu>2021-08-23 21:16:46 -0600
commit8961761e0b3c7b3cc11a00f6ac6ebf7a29bc5a10 (patch)
tree277ebcf5150a1950dbd4deacb82cd89fbd9ce83f /alpine/alpine.c
parente9b3f2043f7d309ecc58b907ff17d561ff972698 (diff)
downloadalpine-8961761e0b3c7b3cc11a00f6ac6ebf7a29bc5a10.tar.xz
* Fix some memory leaks reported by Valgrind.
Diffstat (limited to 'alpine/alpine.c')
-rw-r--r--alpine/alpine.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/alpine/alpine.c b/alpine/alpine.c
index cb752603..7a512a1a 100644
--- a/alpine/alpine.c
+++ b/alpine/alpine.c
@@ -65,6 +65,7 @@ static char rcsid[] = "$Id: alpine.c 1266 2009-07-14 18:39:12Z hubert@u.washingt
#include "smime.h"
#include "newmail.h"
#include "xoauth2conf.h"
+#include "xoauth2info.h"
#ifndef _WINDOWS
#include "../pico/osdep/raw.h" /* for STD*_FD */
#endif
@@ -693,6 +694,9 @@ main(int argc, char **argv)
min_v = pith_ssl_encryption_version(min_s);
max_v = pith_ssl_encryption_version(max_s);
+ if(min_s != NULL) fs_give((void **) &min_s);
+ if(max_s != NULL) fs_give((void **) &max_s);
+
if(min_v < 0 || max_v < 0){
snprintf(tmp_20k_buf, SIZEOF_20KBUF,
_("Bad encryption range: \"%s\": resetting to default"),
@@ -3405,6 +3409,7 @@ goodnight_gracey(struct pine *pine_state, int exit_val)
free_pith_module_globals();
free_pico_module_globals();
free_c_client_module_globals();
+ xoauth_free_info();
#ifdef DEBUG
if(debugfile){
@@ -3653,10 +3658,7 @@ prune_folders_ok(void)
void
free_alpine_module_globals(void)
-{
-#ifdef LOCAL_PASSWD_CACHE
- free_passfile_cache();
-#endif
+{
free_message_queue();
free_titlebar_globals();
}