blockdev_nvme: free name in nvme_ctrlr
Need to free this variable. Change-Id: I78a7d5b312db6487ed65b9d314590a28408da761 Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/363477 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
61119d7862
commit
7bc1a7d1a6
@ -57,7 +57,7 @@ struct nvme_ctrlr {
|
||||
*/
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
struct spdk_nvme_transport_id trid;
|
||||
const char *name;
|
||||
char *name;
|
||||
int ref;
|
||||
|
||||
struct spdk_poller *adminq_timer_poller;
|
||||
@ -212,6 +212,7 @@ bdev_nvme_destruct(void *ctx)
|
||||
spdk_io_device_unregister(nvme_ctrlr->ctrlr);
|
||||
spdk_poller_unregister(&nvme_ctrlr->adminq_timer_poller, NULL);
|
||||
spdk_nvme_detach(nvme_ctrlr->ctrlr);
|
||||
free(nvme_ctrlr->name);
|
||||
free(nvme_ctrlr);
|
||||
return 0;
|
||||
}
|
||||
@ -618,7 +619,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
{
|
||||
struct nvme_ctrlr *nvme_ctrlr;
|
||||
struct nvme_probe_ctx *ctx = cb_ctx;
|
||||
const char *name = NULL;
|
||||
char *name = NULL;
|
||||
size_t i;
|
||||
|
||||
if (ctx) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user