From 9d4d810861c64106b9ba5d1a8d8e6241b8de469e Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 2 Jul 2014 12:49:14 +0200 Subject: [PATCH] Free labels in freeSparklineSequence(). --- src/sparkline.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sparkline.c b/src/sparkline.c index 6fc694ea1..aeb8aa7da 100644 --- a/src/sparkline.c +++ b/src/sparkline.c @@ -78,6 +78,10 @@ void sparklineSequenceAddSample(struct sequence *seq, double value, char *label) /* Free a sequence. */ void freeSparklineSequence(struct sequence *seq) { + int j; + + for (j = 0; j < seq->length; j++) + zfree(seq->samples[j].label); zfree(seq->samples); zfree(seq); }