diff options
author | Eduardo Chappa <chappa@washington.edu> | 2021-08-23 21:16:46 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2021-08-23 21:16:46 -0600 |
commit | 8961761e0b3c7b3cc11a00f6ac6ebf7a29bc5a10 (patch) | |
tree | 277ebcf5150a1950dbd4deacb82cd89fbd9ce83f /pith/imap.c | |
parent | e9b3f2043f7d309ecc58b907ff17d561ff972698 (diff) | |
download | alpine-8961761e0b3c7b3cc11a00f6ac6ebf7a29bc5a10.tar.xz |
* Fix some memory leaks reported by Valgrind.
Diffstat (limited to 'pith/imap.c')
-rw-r--r-- | pith/imap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pith/imap.c b/pith/imap.c index fb7c3972..f91937b1 100644 --- a/pith/imap.c +++ b/pith/imap.c @@ -1125,6 +1125,10 @@ imap_flush_passwd_cache(int dumpcache) if(l->user) fs_give((void **) &l->user); + if(!(l->passwd >= (char *) private_store + && l->passwd <= p)) + fs_give((void **) &l->passwd); + free_strlist(&l->hosts); fs_give((void **) &l); @@ -1134,6 +1138,9 @@ imap_flush_passwd_cache(int dumpcache) cert_failure_list = cert_failure_list->next; if(l->user) fs_give((void **) &l->user); + if(!(l->passwd >= (char *) private_store + && l->passwd <= p)) + fs_give((void **) &l->passwd); free_strlist(&l->hosts); |