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

src/libmime/archives.c
src/libserver/dns.c
src/libutil/rrd.c

index 4d7867f67837e5d22dc39ed8a4193b87023f157f..1101213d19d05013cdd1ee13cbb229bfe976a8ca 100644 (file)
@@ -254,6 +254,8 @@ rspamd_archive_process_zip (struct rspamd_task *task,
                }
                else {
                        g_free (f);
+
+                       return;
                }
 
                /* Process extra fields */
index c23390a47f188414a62c0006d47ae775cff211f0..0eff240a66c5802a4a2d4fc78c2c95454122ea6f 100644 (file)
@@ -652,6 +652,7 @@ rspamd_process_fake_reply (struct rspamd_config *cfg,
                                        else {
                                                DL_APPEND (replies, rep);
                                        }
+                                       break;
                                case RDNS_REQUEST_SRV:
                                default:
                                        msg_err_config ("invalid or unsupported reply element "
index a270d87c642c722f86cb5f17635c0a631af0868f..09e488f9ad9aa833ff7c7df56273b111aca09845 100644 (file)
@@ -747,7 +747,7 @@ rspamd_rrd_finalize (struct rspamd_rrd_file *file, GError **err)
                close (fd);
                g_set_error (err,
                        rrd_error_quark (), ENOMEM, "mmap failed: %s", strerror (errno));
-               g_free (file);
+
                return FALSE;
        }