]> git.puffer.fish Git - mirror/frr.git/commitdiff
mgmtd: fix coverity CID 1574980
authorChristian Hopps <chopps@labn.net>
Sat, 30 Dec 2023 14:34:44 +0000 (14:34 +0000)
committerChristian Hopps <chopps@labn.net>
Sat, 30 Dec 2023 16:03:45 +0000 (16:03 +0000)
Signed-off-by: Christian Hopps <chopps@labn.net>
mgmtd/mgmt_txn.c

index 0696339472c8773a7fcc6487d9e30faadceff66e..ea3236e80b96915488b50501028a38d8e304f0a3 100644 (file)
@@ -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");
        }