]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Plug memory leak on failed updates
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 11 Jan 2017 16:50:16 +0000 (16:50 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 11 Jan 2017 17:20:37 +0000 (17:20 +0000)
src/fuzzy_storage.c

index 62232f3759089f5e82696e392ca12f26e9f75b80..3e2c00f749479891d31e01f5c1b4eb314a767035 100644 (file)
@@ -516,6 +516,14 @@ rspamd_fuzzy_updates_cb (gboolean success, void *ud)
                                        g_queue_get_length (ctx->updates_pending),
                                        ctx->updates_maxfail);
                        ctx->updates_failed = 0;
+                       cur = ctx->updates_pending->head;
+
+                       while (cur) {
+                               io_cmd = cur->data;
+                               g_slice_free1 (sizeof (*io_cmd), io_cmd);
+                               cur = g_list_next (cur);
+                       }
+
                        g_queue_clear (ctx->updates_pending);
                }
                else {