diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-08-22 21:41:48 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-08-22 21:41:48 +0400 |
commit | b90267a71cc8cdc8b38675322ef9fa7a9cb5468c (patch) | |
tree | 3bff8af523d19ec9cff93134b067fc404795000d /src/html.c | |
parent | ed224e6a3530f54b5993e39066a8397d54e9517e (diff) | |
download | rspamd-b90267a71cc8cdc8b38675322ef9fa7a9cb5468c.tar.gz rspamd-b90267a71cc8cdc8b38675322ef9fa7a9cb5468c.zip |
* Rework thread pools locking logic to avoid global lua mutex usage.
Fixed several memory leaks with modern glib.
Fixed memory leak in dkim code.
Fixed a problem with static global variables in shared libraries.
Diffstat (limited to 'src/html.c')
-rw-r--r-- | src/html.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/html.c b/src/html.c index 51d7ccb16..73c4193c6 100644 --- a/src/html.c +++ b/src/html.c @@ -29,7 +29,7 @@ #include "html.h" #include "url.h" -sig_atomic_t tags_sorted = 0; +static sig_atomic_t tags_sorted = 0; static struct html_tag tag_defs[] = { /* W3C defined elements */ @@ -156,7 +156,7 @@ static struct html_tag tag_defs[] = { {Tag_WBR, "wbr", (CM_INLINE | CM_EMPTY)}, }; -sig_atomic_t entities_sorted = 0; +static sig_atomic_t entities_sorted = 0; struct _entity; typedef struct _entity entity; @@ -438,7 +438,7 @@ static entity entities_defs[] = { {"euro", 8364, "E"}, }; -static entity *entities_defs_num = NULL; +static entity entities_defs_num[ (G_N_ELEMENTS (entities_defs)) ]; static gint tag_cmp (const void *m1, const void *m2) @@ -881,7 +881,6 @@ add_html_node (struct worker_task *task, memory_pool_t * pool, struct mime_text_ } if (!entities_sorted) { qsort (entities_defs, G_N_ELEMENTS (entities_defs), sizeof (entity), entity_cmp); - entities_defs_num = g_new (entity, G_N_ELEMENTS (entities_defs)); memcpy (entities_defs_num, entities_defs, sizeof (entities_defs)); qsort (entities_defs_num, G_N_ELEMENTS (entities_defs), sizeof (entity), entity_cmp_num); entities_sorted = 1; |