From 2e39ad92e2a84bd00c2f4ad0011756f793a25cf7 Mon Sep 17 00:00:00 2001 From: David Sheets Date: Wed, 1 Feb 2017 20:24:21 +0000 Subject: [PATCH] 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 --- alpine/packages/transfused/transfused_perfstat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/alpine/packages/transfused/transfused_perfstat.c b/alpine/packages/transfused/transfused_perfstat.c index 972331e0e..ff505445e 100644 --- a/alpine/packages/transfused/transfused_perfstat.c +++ b/alpine/packages/transfused/transfused_perfstat.c @@ -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);