diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-02-01 12:15:14 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-02-01 12:15:14 +0000 |
commit | e739d5efc9efc4240e47b79fe769d4ea9bf9970a (patch) | |
tree | afb0bbcf456a340f1730d2a799fc3c7d6d23a4e5 /src/libmime/mime_encoding.c | |
parent | c40899832e2194fd78bd9d7dc64e5f791e3de24f (diff) | |
download | rspamd-e739d5efc9efc4240e47b79fe769d4ea9bf9970a.tar.gz rspamd-e739d5efc9efc4240e47b79fe769d4ea9bf9970a.zip |
[Minor] Plug potential memory leak with ISO-8859-16 converter
Diffstat (limited to 'src/libmime/mime_encoding.c')
-rw-r--r-- | src/libmime/mime_encoding.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); } } |