From: Vsevolod Stakhov Date: Wed, 11 Jan 2017 16:50:16 +0000 (+0000) Subject: [Minor] Plug memory leak on failed updates X-Git-Tag: 1.5.0~367 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=289e09b068e544278d1d31dea284fc4e5abbd882;p=thirdparty%2Frspamd.git [Minor] Plug memory leak on failed updates --- diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index 62232f3759..3e2c00f749 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -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 {