From cc9fbd270e6a845289aee475d84b2a2711e8d6aa Mon Sep 17 00:00:00 2001 From: "zhaozhao.zz" Date: Thu, 29 Feb 2024 14:16:41 +0800 Subject: [PATCH] freeDictIfNeeded when kvstoreEmpty (#13098) just like `kvstoreDictDelete`, we need check `freeDictIfNeeded` when `kvstoreEmpty`. --- src/kvstore.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kvstore.c b/src/kvstore.c index 9e3061ba8..61f7e43ac 100644 --- a/src/kvstore.c +++ b/src/kvstore.c @@ -277,6 +277,7 @@ void kvstoreEmpty(kvstore *kvs, void(callback)(dict*)) { if (metadata->rehashing_node) metadata->rehashing_node = NULL; dictEmpty(d, callback); + freeDictIfNeeded(kvs, didx); } listEmpty(kvs->rehashing);