summaryrefslogtreecommitdiffstats
path: root/src/libmime/email_addr.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-11-10 19:26:20 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-11-10 19:26:20 +0000
commit44b9961895e11117b8500ae0d070046670f998e6 (patch)
treea032fcc40896a56dced485a91dfc547eb99e037a /src/libmime/email_addr.h
parent8b1cf85652664b562a70060fc30e62b90823daee (diff)
downloadrspamd-44b9961895e11117b8500ae0d070046670f998e6.tar.gz
rspamd-44b9961895e11117b8500ae0d070046670f998e6.zip
[Fix] Plug memory leak when setting email addresses from Lua
+ Optimize emails addr structure and API MFH: rspamd-1.6
Diffstat (limited to 'src/libmime/email_addr.h')
-rw-r--r--src/libmime/email_addr.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/libmime/email_addr.h b/src/libmime/email_addr.h
index b4f192ee7..8c9b54713 100644
--- a/src/libmime/email_addr.h
+++ b/src/libmime/email_addr.h
@@ -28,11 +28,10 @@ enum rspamd_email_address_flags {
RSPAMD_EMAIL_ADDR_BRACED = (1 << 2),
RSPAMD_EMAIL_ADDR_QUOTED = (1 << 3),
RSPAMD_EMAIL_ADDR_EMPTY = (1 << 4),
- RSPAMD_EMAIL_ADDR_SMTP = (1 << 5),
- RSPAMD_EMAIL_ADDR_HAS_BACKSLASH = (1 << 6),
- RSPAMD_EMAIL_ADDR_ADDR_ALLOCATED = (1 << 7),
- RSPAMD_EMAIL_ADDR_USER_ALLOCATED = (1 << 8),
- RSPAMD_EMAIL_ADDR_HAS_8BIT = (1 << 9),
+ RSPAMD_EMAIL_ADDR_HAS_BACKSLASH = (1 << 5),
+ RSPAMD_EMAIL_ADDR_ADDR_ALLOCATED = (1 << 6),
+ RSPAMD_EMAIL_ADDR_USER_ALLOCATED = (1 << 7),
+ RSPAMD_EMAIL_ADDR_HAS_8BIT = (1 << 8),
};
/*
@@ -47,12 +46,9 @@ struct rspamd_email_address {
guint raw_len;
guint addr_len;
- guint user_len;
guint domain_len;
- guint name_len;
- enum rspamd_email_address_flags flags;
-
- ref_entry_t ref;
+ guint16 user_len;
+ guchar flags;
};
/**
@@ -84,9 +80,6 @@ GPtrArray *rspamd_email_address_from_mime (rspamd_mempool_t *pool,
*/
void rspamd_email_address_list_destroy (gpointer ptr);
-struct rspamd_email_address * rspamd_email_address_ref (
- struct rspamd_email_address *addr);
-
-void rspamd_email_address_unref (struct rspamd_email_address *addr);
+void rspamd_email_address_free (struct rspamd_email_address *addr);
#endif /* SRC_LIBMIME_EMAIL_ADDR_H_ */