blobstore: do not _spdk_bs_free before io devices are registered
io_device and their channels are created after _spdk_bs_alloc finishes. Until they are, only free() is required on allocated bs structure. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ie00126cdaa2bb5cd77cad2dec89d670734367b49 Reviewed-on: https://review.gerrithub.io/379675 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
6bfff2f1cc
commit
d959fecdd5
@ -1385,7 +1385,7 @@ _spdk_bs_alloc(struct spdk_bs_dev *dev, struct spdk_bs_opts *opts)
|
||||
bs->num_free_clusters = bs->total_clusters;
|
||||
bs->used_clusters = spdk_bit_array_create(bs->total_clusters);
|
||||
if (bs->used_clusters == NULL) {
|
||||
_spdk_bs_free(bs);
|
||||
free(bs);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user