From 57deea9d3eb3825730bb29b64b8d97f5370c1ba5 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 21 Nov 2014 12:12:35 +0000 Subject: [PATCH] Fix leaking of iconv descriptors. --- src/libmime/message.c | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.39.5