From 1c95c075966407729648fe676883a75be638824c Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 19 Jul 2018 12:22:42 +0200 Subject: [PATCH] Make vars used only by INFO CLIENTS local to the block. Related to #4727. --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 251209b7..06826a35 100644 --- a/src/server.c +++ b/src/server.c @@ -2955,7 +2955,6 @@ sds genRedisInfoString(char *section) { time_t uptime = server.unixtime-server.stat_starttime; int j; struct rusage self_ru, c_ru; - unsigned long lol, bib; int allsections = 0, defsections = 0; int sections = 0; @@ -3034,6 +3033,7 @@ sds genRedisInfoString(char *section) { /* Clients */ if (allsections || defsections || !strcasecmp(section,"clients")) { + unsigned long lol, bib; getClientsMaxBuffers(&lol,&bib); if (sections++) info = sdscat(info,"\r\n"); info = sdscatprintf(info,