diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-12 15:17:27 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-12 15:18:17 +0100 |
commit | 0a2eb9a433a41667b01863b61da4df42b3e48dec (patch) | |
tree | 0e78c0ad576d0cc3f76f760f9e4218d603b69cc2 /src/libmime/mime_headers.c | |
parent | 798a6cc321640f579c37dc400a9bca31cb8ad5e2 (diff) | |
download | rspamd-0a2eb9a433a41667b01863b61da4df42b3e48dec.tar.gz rspamd-0a2eb9a433a41667b01863b61da4df42b3e48dec.zip |
[Project] Fix some final issues
Diffstat (limited to 'src/libmime/mime_headers.c')
-rw-r--r-- | src/libmime/mime_headers.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c index bc8ace679..f9027b53d 100644 --- a/src/libmime/mime_headers.c +++ b/src/libmime/mime_headers.c @@ -1602,13 +1602,17 @@ rspamd_message_get_header_from_hash (khash_t(rspamd_mime_headers_htb) *htb, { khiter_t k; - k = kh_get (rspamd_mime_headers_htb, htb, (gchar *)field); + if (htb) { + k = kh_get (rspamd_mime_headers_htb, htb, (gchar *) field); - if (k == kh_end (htb)) { - return NULL; + if (k == kh_end (htb)) { + return NULL; + } + + return kh_value (htb, k); } - return kh_value (htb, k); + return NULL; } struct rspamd_mime_header * |