summaryrefslogtreecommitdiff
path: root/pop3d
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2015-08-04 07:46:12 +0300
committerSergey Poznyakoff <gray@gnu.org>2015-08-04 07:46:12 +0300
commitfbcf481ed5816ccc2d84c9a0f0214f0c8c73f8c9 (patch)
tree8e86a973a38b11457a08d25cc3de6921c55d06be /pop3d
parentd2cfcacab2b99e8b727be4e94ac76248f992d2b1 (diff)
downloadmailutils-fbcf481ed5816ccc2d84c9a0f0214f0c8c73f8c9.tar.gz
mailutils-fbcf481ed5816ccc2d84c9a0f0214f0c8c73f8c9.tar.bz2
Bugfix
* pop3d/bulletin.c (read_bulletin_db): Fix memory/descriptor leak.
Diffstat (limited to 'pop3d')
-rw-r--r--pop3d/bulletin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pop3d/bulletin.c b/pop3d/bulletin.c
index 131a1c047..a5616ebc8 100644
--- a/pop3d/bulletin.c
+++ b/pop3d/bulletin.c
@@ -137,6 +137,7 @@ read_bulletin_db (size_t *pnum)
rc = mu_dbm_safety_check (db);
if (rc)
{
+ mu_dbm_destroy (&db);
if (rc == ENOENT)
{
*pnum = 0;
@@ -145,7 +146,6 @@ read_bulletin_db (size_t *pnum)
mu_diag_output (MU_DIAG_ERROR,
_("bulletin db %s fails safety check: %s"),
bulletin_db_name, mu_strerror (rc));
- mu_dbm_destroy (&db);
return 1;
}
@@ -167,6 +167,7 @@ read_bulletin_db (size_t *pnum)
if (rc == MU_ERR_NOENT)
{
+ mu_dbm_destroy (&db);
*pnum = 0;
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.