diff options
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r-- | camel/camel-mime-utils.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index 4e5ec39ee3..6e7607f096 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -4246,7 +4246,7 @@ camel_mime_utils_init(void) base64_init(); /* precompile regex's for speed at runtime */ - for (i = 0; i < sizeof(mail_list_magic) / sizeof(mail_list_magic[0]); i++) { + for (i = 0; i < G_N_ELEMENTS (mail_list_magic); i++) { errcode = regcomp(&mail_list_magic[i].regex, mail_list_magic[i].pattern, REG_EXTENDED|REG_ICASE); if (errcode != 0) { char *errstr; @@ -4264,3 +4264,13 @@ camel_mime_utils_init(void) g_assert(regex_compilation_failed == 0); } + + +void +camel_mime_utils_shutdown (void) +{ + int i; + + for (i = 0; i < G_N_ELEMENTS (mail_list_magic); i++) + regfree (&mail_list_magic[i].regex); +} |