From 1589653b5d174abfd06d60496af14f01efd1e28b Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 12 Dec 2018 09:07:33 -0700 Subject: [PATCH] nvme/perf: remove trid_entry from TAILQ before freeing it Fixes #246. Signed-off-by: Jim Harris Change-Id: I0fd4f9922acad507180fef396ebbb5c2304f2dff Reviewed-on: https://review.gerrithub.io/436994 Chandler-Test-Pool: SPDK Automated Test System Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker --- examples/nvme/perf/perf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/nvme/perf/perf.c b/examples/nvme/perf/perf.c index 8099a8062e..187a95cde2 100644 --- a/examples/nvme/perf/perf.c +++ b/examples/nvme/perf/perf.c @@ -1179,6 +1179,7 @@ unregister_trids(void) struct trid_entry *trid_entry, *tmp; TAILQ_FOREACH_SAFE(trid_entry, &g_trid_list, tailq, tmp) { + TAILQ_REMOVE(&g_trid_list, trid_entry, tailq); free(trid_entry); } }