From a4d6e5cf90d710fa638eb650ab8232f3c8279588 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Fri, 6 Apr 2018 16:23:10 -0700 Subject: [PATCH] test: Fix memory leak in nvme unit test This addresses a large number of Klocwork issues. Change-Id: I911960b12f8b62ebf54901c62f34f3b2064e5f61 Signed-off-by: Ben Walker Reviewed-on: https://review.gerrithub.io/406857 Reviewed-by: Daniel Verkamp Tested-by: SPDK Automated Test System Reviewed-by: Shuhei Matsumoto --- test/unit/lib/nvme/nvme_ctrlr.c/nvme_ctrlr_ut.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/unit/lib/nvme/nvme_ctrlr.c/nvme_ctrlr_ut.c b/test/unit/lib/nvme/nvme_ctrlr.c/nvme_ctrlr_ut.c index 614c12c50d..dd62de859c 100644 --- a/test/unit/lib/nvme/nvme_ctrlr.c/nvme_ctrlr_ut.c +++ b/test/unit/lib/nvme/nvme_ctrlr.c/nvme_ctrlr_ut.c @@ -75,6 +75,8 @@ struct spdk_nvme_ctrlr *nvme_transport_ctrlr_construct(const struct spdk_nvme_tr int nvme_transport_ctrlr_destruct(struct spdk_nvme_ctrlr *ctrlr) { + nvme_ctrlr_destruct_finish(ctrlr); + return 0; }