From: Vsevolod Stakhov Date: Fri, 21 Nov 2014 12:12:35 +0000 (+0000) Subject: Fix leaking of iconv descriptors. X-Git-Tag: 0.7.6~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=57deea9d3eb3825730bb29b64b8d97f5370c1ba5;p=rspamd.git Fix leaking of iconv descriptors. --- 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; }