diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-02-07 13:07:16 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-02-07 13:07:16 +0000 |
commit | da92ec30057ab81808905397fe8942416f31a661 (patch) | |
tree | b199eef1d1e9944ca6287d0dbd8a1500e189734f /src/libmime/email_addr.c | |
parent | 3d7aef55713b576997aec976326c1143d14fe3f8 (diff) | |
download | rspamd-da92ec30057ab81808905397fe8942416f31a661.tar.gz rspamd-da92ec30057ab81808905397fe8942416f31a661.zip |
[Project] Add more details to received parser
Diffstat (limited to 'src/libmime/email_addr.c')
-rw-r--r-- | src/libmime/email_addr.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/libmime/email_addr.c b/src/libmime/email_addr.c index 38de7b4f7..24b1d0111 100644 --- a/src/libmime/email_addr.c +++ b/src/libmime/email_addr.c @@ -87,15 +87,17 @@ rspamd_email_address_from_smtp (const gchar *str, guint len) void rspamd_email_address_free (struct rspamd_email_address *addr) { - if (addr->flags & RSPAMD_EMAIL_ADDR_ADDR_ALLOCATED) { - g_free ((void *)addr->addr); - } + if (addr) { + if (addr->flags & RSPAMD_EMAIL_ADDR_ADDR_ALLOCATED) { + g_free ((void *) addr->addr); + } - if (addr->flags & RSPAMD_EMAIL_ADDR_USER_ALLOCATED) { - g_free ((void *)addr->user); - } + if (addr->flags & RSPAMD_EMAIL_ADDR_USER_ALLOCATED) { + g_free ((void *) addr->user); + } - g_free (addr); + g_free (addr); + } } static inline void |