summaryrefslogtreecommitdiff
path: root/libmailutils
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-11-19 08:04:10 +0200
committerSergey Poznyakoff <gray@gnu.org>2021-11-19 08:04:10 +0200
commit8d195a093d55ac81ba743c14990694e5815b05c3 (patch)
tree4fa6fda1f6933083b725789ef5d555a8d90c8bd2 /libmailutils
parent805a3f8343f30a10056810f0fec4f0672dd3c297 (diff)
downloadmailutils-8d195a093d55ac81ba743c14990694e5815b05c3.tar.gz
mailutils-8d195a093d55ac81ba743c14990694e5815b05c3.tar.bz2
Fix memory and fd leak in maildir and amd
* libmailutils/base/amd.c (amd_expunge): Close and destroy the associated message stream. * libproto/maildir/maildir.c (maildir_close): Fix erroneously reverted condition.
Diffstat (limited to 'libmailutils')
-rw-r--r--libmailutils/base/amd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libmailutils/base/amd.c b/libmailutils/base/amd.c
index e488da153..2515caa4a 100644
--- a/libmailutils/base/amd.c
+++ b/libmailutils/base/amd.c
@@ -1386,6 +1386,7 @@ amd_expunge (mu_mailbox_t mailbox)
pp = amd_pool_lookup (mhm);
if (pp)
*pp = NULL;
+ amd_message_stream_close (mhm);
mu_message_destroy (&mhm->message, mhm);
if (amd->msg_free)
amd->msg_free (mhm);

Return to:

Send suggestions and report system problems to the System administrator.