diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-11 11:02:42 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-11 11:02:42 +0000 |
commit | 6af9f27166aefa0c253486f769fac428d8fdbc20 (patch) | |
tree | 9583da7b235dffc4bbc2c1952359d58439d30f75 /src | |
parent | 34b41a21d7b4bcca1f662b4bdbd8618397e10bb5 (diff) | |
download | rspamd-6af9f27166aefa0c253486f769fac428d8fdbc20.tar.gz rspamd-6af9f27166aefa0c253486f769fac428d8fdbc20.zip |
Fix couple of issues found by coverity scan
Diffstat (limited to 'src')
-rw-r--r-- | src/libstat/backends/redis_backend.c | 2 | ||||
-rw-r--r-- | src/libutil/http.c | 3 | ||||
-rw-r--r-- | src/libutil/regexp.c | 2 | ||||
-rw-r--r-- | src/rspamadm/configdump.c | 1 |
4 files changed, 6 insertions, 2 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c index 406b76ab5..61644d004 100644 --- a/src/libstat/backends/redis_backend.c +++ b/src/libstat/backends/redis_backend.c @@ -240,7 +240,7 @@ rspamd_redis_expand_object (const gchar *pattern, } } - if (target == NULL) { + if (target == NULL || task == NULL) { return tlen; } diff --git a/src/libutil/http.c b/src/libutil/http.c index 21b763108..a5dcf6f03 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -431,6 +431,9 @@ rspamd_http_parse_key (rspamd_ftok_t *data, struct rspamd_http_connection *conn, priv->local_key, priv->msg->peer_key); } } + else { + rspamd_pubkey_unref (pk); + } } } diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c index 023cc325d..4cc012567 100644 --- a/src/libutil/regexp.c +++ b/src/libutil/regexp.c @@ -476,7 +476,7 @@ fin: res->raw_re = pcre2_compile (real_pattern, PCRE2_ZERO_TERMINATED, regexp_flags & ~PCRE_FLAG(UTF), &err_code, &err_off, pcre2_ctx); - if (r == NULL) { + if (res->raw_re == NULL) { err_str = g_alloca (1024); memset (err_str, 0, 1024); pcre2_get_error_message (err_code, err_str, 1024); diff --git a/src/rspamadm/configdump.c b/src/rspamadm/configdump.c index 64fb9703d..ca89b5325 100644 --- a/src/rspamadm/configdump.c +++ b/src/rspamadm/configdump.c @@ -104,6 +104,7 @@ rspamadm_add_doc_elt (const ucl_object_t *obj, const ucl_object_t *doc_obj, nobj = ucl_object_fromstring_common ("/*", 0, 0); } else { + rspamd_fstring_free (comment); return; } |