Spdk/test/unit/lib/nvme
Changpeng Liu f4e3f59e0e nvme: fix potential memory leak when there is controller scan failure
The nvme_transport_ctrlr_scan() may return failure while there are
multiple controllers, so the probe context's init_ctrlrs list may
not null for this case, so when free the probe context, let's ensure
there is no controller in the init_ctrlrs list.  Also added a UT to
cover this case.

Fix issue #1095.

Change-Id: I4d9a10ad73cf00bbe159edd1f5b919797333feb6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476969
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-09 13:58:01 +00:00
..
nvme_ctrlr_cmd.c test/nvme: Add test_doorbell_buffer_config for nvme_ctrlr_cmd. 2019-10-11 18:47:06 +00:00
nvme_ctrlr_ocssd_cmd.c ocssd: nvme driver public API extension for Open-Channel 2018-06-12 17:59:33 +00:00
nvme_ctrlr.c nvme: remove redundant transport_qp_is_failed checks 2019-12-09 13:55:41 +00:00
nvme_ns_cmd.c nvme: replace cdw11 with specific union strucutre 2019-12-06 14:43:41 +00:00
nvme_ns_ocssd_cmd.c nvme: assign qpair when req is allocated 2019-06-04 00:01:35 +00:00
nvme_ns.c nvme: add helper to wait for internal commands 2018-05-28 01:43:55 +00:00
nvme_pcie.c test/nvme: Fix static memory accessing overflows. 2019-12-04 15:13:57 +00:00
nvme_qpair.c nvme: replace nvme_qpair_state_equals. 2019-12-09 13:55:41 +00:00
nvme_quirks.c nvme: add debug logs for matched quirks 2018-02-23 10:07:39 -05:00
nvme_rdma.c test/unit: remove unnecessary mock definitions 2019-01-13 00:48:20 +00:00
nvme_tcp.c nvme/tcp: detect cq errors. 2019-11-15 18:27:27 +00:00
nvme.c nvme: fix potential memory leak when there is controller scan failure 2019-12-09 13:58:01 +00:00
Makefile nvme/tcp: add unit test to verify the bug in nvmf_tcp_pdu_set_data_buf 2019-07-01 08:28:20 +00:00