]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix some dead ends
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 17 Sep 2021 20:35:30 +0000 (21:35 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 17 Sep 2021 20:35:30 +0000 (21:35 +0100)
Found by: coverity scan

contrib/kann/kann.c
src/libserver/protocol.c

index 72fb0c06130b5b66c9b7a07c7cc7a95a5c88742b..70d1f02d68fdcb0489f99cbc93410151673f8148 100644 (file)
@@ -498,7 +498,6 @@ kann_t *kann_load_fp(FILE *fp)
 
        (void) !fread(magic, 1, 4, fp);
        if (strncmp(magic, KANN_MAGIC, 4) != 0) {
-               fclose(fp);
                return 0;
        }
        ann = (kann_t*)calloc(1, sizeof(kann_t));
index 6e97068a645200cedd259af533fa737c8999c7fc..654f16113066cba4e66a25c64504b5287a3c8486 100644 (file)
@@ -1093,6 +1093,7 @@ rspamd_protocol_rewrite_subject (struct rspamd_task *task)
                                g_string_append_c (subj_buf, '%');
                                c = p + 2;
                                p += 2;
+                               break;
                        default:
                                p ++; /* Just % something unknown */
                                break;