From e739d5efc9efc4240e47b79fe769d4ea9bf9970a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 1 Feb 2019 12:15:14 +0000 Subject: [PATCH] [Minor] Plug potential memory leak with ISO-8859-16 converter --- src/libmime/mime_encoding.c | 3 +++ 1 file changed, 3 insertions(+) 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); } } -- 2.39.5