bdev/crypto: Free aux buf when crypto op fails
Fixes issue #2886 Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com> Change-Id: I19e2ba3763822bc9092fba584d35a6802c520ab7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16600 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
This commit is contained in:
parent
0fa77938a7
commit
a54fc9f4a2
@ -134,6 +134,9 @@ _crypto_operation_complete(void *ref, int status)
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
if (bdev_io->type == SPDK_BDEV_IO_TYPE_WRITE) {
|
||||
spdk_bdev_io_put_aux_buf(bdev_io, crypto_io->aux_buf_raw);
|
||||
}
|
||||
spdk_bdev_io_complete(bdev_io, SPDK_BDEV_IO_STATUS_FAILED);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user