Fix issues found by coverity
Fix issues found by coverity

minaevmike/rspamd,AlexeySa/rspamd,minaevmike/rspamd,minaevmike/rspamd,andrejzverev/rspamd,minaevmike/rspamd,minaevmike/rspamd,minaevmike/rspamd,andrejzverev/rspamd,andrejzverev/rspamd,AlexeySa/rspamd,minaevmike/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,andrejzverev/rspamd,andrejzverev/rspamd,AlexeySa/rspamd,minaevmike/rspamd,andrejzverev/rspamd,andrejzverev/rspamd,AlexeySa/rspamd,minaevmike/rspamd,andrejzverev/rspamd