From: Christian Hopps Date: Sat, 30 Dec 2023 14:34:44 +0000 (+0000) Subject: mgmtd: fix coverity CID 1574980 X-Git-Tag: base_10.0~164^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=30e63f2900578c29c1ac6b56dc8f36321658bcec;p=mirror%2Ffrr.git mgmtd: fix coverity CID 1574980 Signed-off-by: Christian Hopps --- diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c index 0696339472..ea3236e80b 100644 --- a/mgmtd/mgmt_txn.c +++ b/mgmtd/mgmt_txn.c @@ -1267,6 +1267,7 @@ static int txn_get_tree_data_done(struct mgmt_txn_ctx *txn, struct mgmt_txn_req *txn_req) { struct txn_req_get_tree *get_tree = txn_req->req.get_tree; + uint64_t req_id = txn_req->req_id; int ret = 0; /* cancel timer and send reply onward */ @@ -1284,11 +1285,9 @@ static int txn_get_tree_data_done(struct mgmt_txn_ctx *txn, if (ret) { MGMTD_TXN_ERR("Error saving the results of GETTREE for txn-id %" PRIu64 " req_id %" PRIu64 " to requested type %u", - txn->txn_id, txn_req->req_id, - get_tree->result_type); + txn->txn_id, req_id, get_tree->result_type); - (void)mgmt_fe_adapter_txn_error(txn->txn_id, txn_req->req_id, - false, ret, + (void)mgmt_fe_adapter_txn_error(txn->txn_id, req_id, false, ret, "Error converting results of GETTREE"); }