From de6c96be4cd02746784a2bbe1ce76d95ecedacbb Mon Sep 17 00:00:00 2001 From: Liang Zheng Date: Tue, 15 Oct 2024 15:13:13 +0800 Subject: [PATCH] fix: nil pointer dereference when failed to scan out the quota records from redis (#21046) Signed-off-by: Liang Zheng --- src/controller/quota/controller.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controller/quota/controller.go b/src/controller/quota/controller.go index a04894c66..e3ffc92f4 100644 --- a/src/controller/quota/controller.go +++ b/src/controller/quota/controller.go @@ -123,6 +123,7 @@ func flushQuota(ctx context.Context) { iter, err := cache.Default().Scan(ctx, "quota:*") if err != nil { log.Errorf("failed to scan out the quota records from redis") + return } for iter.Next(ctx) {