commit 004eb44: eliminate smembers: remove redundent cleanup
resec
resec0109 at gmail.com
Thu Jan 16 12:35:10 UTC 2020
Author: resec
Date: 2019-11-19 22:18:41 +0800
URL: https://github.com/rspamd/rspamd/commit/004eb44a8652214635ffeb8b08e56b4347a5aa60 (refs/pull/3153/head)
eliminate smembers: remove redundent cleanup
---
src/libstat/backends/redis_backend.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c
index d4ac6a30e..ec65a133f 100644
--- a/src/libstat/backends/redis_backend.c
+++ b/src/libstat/backends/redis_backend.c
@@ -921,17 +921,7 @@ rspamd_redis_stat_keys (redisAsyncContext *c, gpointer r, gpointer priv)
}
if (more) {
- /* Cleanup the cbdata->cur_keys and re-allowcate */
- for (i = 0; i < cbdata->cur_keys->len; i ++) {
- k = g_ptr_array_index (cbdata->cur_keys, i);
- g_free (k);
- }
-
- g_ptr_array_free (cbdata->cur_keys, TRUE);
-
- cbdata->cur_keys = g_ptr_array_new ();
-
- /* Get more keys */
+ /* Get more stat keys */
redisAsyncCommand (cbdata->redis, rspamd_redis_stat_keys, redis_elt,
"SSCAN %s_keys %s COUNT 1000",
cbdata->elt->ctx->stcf->symbol, more_elt->str);
More information about the Commits
mailing list