aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libmime/message.c3
-rw-r--r--src/libserver/cfg_utils.c1
-rw-r--r--src/lua/lua_ip.c3
3 files changed, 4 insertions, 3 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index 9f3df14e2..7ee31a26d 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -1237,7 +1237,8 @@ process_message (struct rspamd_task *task)
else {
/* We got only message, no mime headers or anything like this */
/* Construct fake message for it */
- task->message = g_mime_message_new (TRUE);
+ message = g_mime_message_new (TRUE);
+ task->message = message;
if (task->from_envelope) {
g_mime_message_set_sender (task->message,
rspamd_task_get_sender (task));
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index 04e590105..8d0955c5c 100644
--- a/src/libserver/cfg_utils.c
+++ b/src/libserver/cfg_utils.c
@@ -292,6 +292,7 @@ rspamd_parse_bind_line (struct rspamd_config *cfg,
cnf->bind_host = rspamd_mempool_strdup (cfg->cfg_pool, tokens[0]);
if (tokens[1] == NULL) {
cnf->bind_port = DEFAULT_BIND_PORT;
+ err = NULL;
}
else {
cnf->bind_port = strtoul (tokens[1], &err, 10);
diff --git a/src/lua/lua_ip.c b/src/lua/lua_ip.c
index f5614afe3..647594198 100644
--- a/src/lua/lua_ip.c
+++ b/src/lua/lua_ip.c
@@ -62,7 +62,7 @@ static const struct luaL_reg iplib_f[] = {
#define NEW_IP(n, o, p) do { \
(n) = g_slice_alloc (sizeof (struct rspamd_lua_ip)); \
- if (o != NULL) { memcpy ((n), (o) ? (o) : (n), sizeof (struct rspamd_lua_ip)); } \
+ if ((o) != NULL) { memcpy ((n), (o) ? (o) : (n), sizeof (struct rspamd_lua_ip)); } \
(p) = lua_newuserdata (L, sizeof (struct rspamd_lua_ip *)); \
rspamd_lua_setclass (L, "rspamd{ip}", -1); \
*(p) = (n); \
@@ -403,7 +403,6 @@ lua_ip_copy (lua_State *L)
{
struct rspamd_lua_ip *ip = lua_check_ip (L, 1),
*nip, **pip;
- const gchar *ip_str;
if (ip) {
NEW_IP(nip, ip, pip);