diff options
author | Binbin <binloveplay1314@qq.com> | 2023-03-09 18:05:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-09 12:05:50 +0200 |
commit | c46d68d6d273e7c86fd1f1d10caca4e47a3294f8 (patch) | |
tree | a8cc5e0fc98be7b914b74c2f71ef9fd3eaaa7f60 /src | |
parent | a7c9e5053a96e66d77d243702bbadeb95c6a640d (diff) | |
download | redis-c46d68d6d273e7c86fd1f1d10caca4e47a3294f8.tar.gz |
Fix Uninitialised value error in createSparklineSequence (LATENCY GRAPH) (#11892)
This was exposed by a new LATENCY GRAPH valgrind test.
There are no security implications, fix by initializing
these members.
Diffstat (limited to 'src')
-rw-r--r-- | src/sparkline.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sparkline.c b/src/sparkline.c index 67482c774..4c0f2b81f 100644 --- a/src/sparkline.c +++ b/src/sparkline.c @@ -57,7 +57,10 @@ static int label_margin_top = 1; struct sequence *createSparklineSequence(void) { struct sequence *seq = zmalloc(sizeof(*seq)); seq->length = 0; + seq->labels = 0; seq->samples = NULL; + seq->min = 0.0f; + seq->max = 0.0f; return seq; } |