From: Vsevolod Stakhov Date: Fri, 1 Feb 2019 12:15:14 +0000 (+0000) Subject: [Minor] Plug potential memory leak with ISO-8859-16 converter X-Git-Tag: 1.9.0~227 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e739d5efc9efc4240e47b79fe769d4ea9bf9970a;p=rspamd.git [Minor] Plug potential memory leak with ISO-8859-16 converter --- diff --git a/src/libmime/mime_encoding.c b/src/libmime/mime_encoding.c index 213817747..7b897929e 100644 --- a/src/libmime/mime_encoding.c +++ b/src/libmime/mime_encoding.c @@ -180,6 +180,9 @@ rspamd_mime_get_converter_cached (const gchar *enc, UErrorCode *err) conv = g_malloc0 (sizeof (*conv)); conv->is_internal = TRUE; conv->d.cnv_table = iso_8859_16_map; + conv->canon_name = g_strdup (canon_name); + + rspamd_lru_hash_insert (cache, conv->canon_name, conv, 0, 0); } }