test/deallocated : Fix memory leak about context.
Here code returns but context isn't freed. And we can change to break here also. Signed-off-by: yidong0635 <dongx.yi@intel.com> Change-Id: I8f2173ae3599c13c99c7d70c19e2f8ce0c023f38 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4396 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
b9ba32aa63
commit
adb7cf05d3
@ -265,6 +265,7 @@ deallocate_test(void)
|
||||
ns_entry->qpair = spdk_nvme_ctrlr_alloc_io_qpair(ns_entry->ctrlr, NULL, 0);
|
||||
if (ns_entry->qpair == NULL) {
|
||||
printf("ERROR: spdk_nvme_ctrlr_alloc_io_qpair() failed.\n");
|
||||
cleanup(&context);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user