commit e739d5e: [Minor] Plug potential memory leak with ISO-8859-16 converter
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Feb 1 12:21:04 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-02-01 12:15:14 +0000
URL: https://github.com/rspamd/rspamd/commit/e739d5efc9efc4240e47b79fe769d4ea9bf9970a
[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);
}
}
More information about the Commits
mailing list