From 28165febe3f84f913256953ce8167b95f758ba0b Mon Sep 17 00:00:00 2001 From: Alexander Oganezov Date: Mon, 21 Oct 2024 09:35:28 -0700 Subject: [PATCH] DAOS-16696 cart: Fix rc in error path (#15313) - Fix rc in error path during ivo_on_update failure Required-githooks: true Signed-off-by: Alexander A Oganezov --- src/cart/crt_iv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cart/crt_iv.c b/src/cart/crt_iv.c index 603e565ac1f..bf8124a8a6a 100644 --- a/src/cart/crt_iv.c +++ b/src/cart/crt_iv.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2016-2023 Intel Corporation. + * (C) Copyright 2016-2024 Intel Corporation. * * SPDX-License-Identifier: BSD-2-Clause-Patent */ @@ -2911,8 +2911,12 @@ bulk_update_transfer_done_aux(const struct crt_bulk_cb_info *info) return rc; send_error: - rc = crt_bulk_free(cb_info->buc_bulk_hdl); + /* send back whatever error got us here */ output->rc = rc; + rc = crt_bulk_free(cb_info->buc_bulk_hdl); + if (rc != 0) + DL_ERROR(rc, "crt_bulk_free() failed"); + iv_ops->ivo_on_put(ivns_internal, &cb_info->buc_iv_value, cb_info->buc_user_priv);