aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-21 12:12:35 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-21 12:12:35 +0000
commit57deea9d3eb3825730bb29b64b8d97f5370c1ba5 (patch)
tree87cccfced274db26e137cae112dd86ee6fcd11c4 /src/libmime
parent30414c92f65c58a3d7a6bc1df7f87f999648a59e (diff)
downloadrspamd-57deea9d3eb3825730bb29b64b8d97f5370c1ba5.tar.gz
rspamd-57deea9d3eb3825730bb29b64b8d97f5370c1ba5.zip
Fix leaking of iconv descriptors.
Diffstat (limited to 'src/libmime')
-rw-r--r--src/libmime/message.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index b93810cb0..3a1baf798 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -927,6 +927,7 @@ rspamd_text_to_utf8 (struct rspamd_task *task,
g_set_error (err, converter_error_quark(), EINVAL,
"output of size %zd is not enough to handle "
"converison of %zd bytes", outlen, len);
+ iconv_close (ic);
return NULL;
case EILSEQ:
case EINVAL:
@@ -948,6 +949,8 @@ rspamd_text_to_utf8 (struct rspamd_task *task,
*d = '\0';
*olen = d - res;
+ iconv_close (ic);
+
return res;
}