From cf3375bf7cac0fc84ed31d7f46ec95bb486b4501 Mon Sep 17 00:00:00 2001 From: Yossi Gottlieb Date: Tue, 8 Sep 2020 16:00:20 +0300 Subject: [PATCH] Fix CONFIG REWRITE of oom-score-adj-values. (#7761) (cherry picked from commit 750acf3a457053ad9f57a263baa84ec68e0ae145) --- src/config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 52acb527b..de1269e48 100644 --- a/src/config.c +++ b/src/config.c @@ -1422,7 +1422,8 @@ void rewriteConfigOOMScoreAdjValuesOption(struct rewriteConfigState *state) { char *option = "oom-score-adj-values"; sds line; - line = sdsempty(); + line = sdsnew(option); + line = sdscatlen(line, " ", 1); for (j = 0; j < CONFIG_OOM_COUNT; j++) { if (server.oom_score_adj_values[j] != configOOMScoreAdjValuesDefaults[j]) force = 1;