Plug memory leak in duration()
Strdup should be followed by a free()... Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
01fdd2876a
commit
d0c7b3bf7d
@ -550,6 +550,7 @@ static void duration(char *buffer, void *_time)
|
||||
char *dot = strchr(mybuffer,'.');
|
||||
*dot = ':';
|
||||
sampletime(mybuffer, _time);
|
||||
free(mybuffer);
|
||||
} else {
|
||||
sampletime(buffer, _time);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user