mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-31 06:32:06 +00:00
transfused perfstat: fix bug with running multiple perfstats in a row (#1129)
After freeing the head of the perfstat block list, we must set it to NULL to indicate that new blocks must be allocated. Previously, we risked segfaults by trying to use a freed list. Signed-off-by: David Sheets <dsheets@docker.com>
This commit is contained in:
parent
031be1e1f9
commit
59947ad010
@ -165,6 +165,7 @@ void *stop_perfstat(parameters_t *params, char *req, size_t len)
|
||||
*((uint64_t *) (reply + 8)) = now(params);
|
||||
|
||||
copy_and_free_perfstats(conn->perfstats, reply + 16);
|
||||
conn->perfstats = NULL;
|
||||
|
||||
unlock("perfstat lock: stop_perfstat", &conn->perfstat_lock);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user