]> git.puffer.fish Git - matthieu/frr.git/commitdiff
mgmtd: fix coverity CID 1574978
authorChristian Hopps <chopps@labn.net>
Sat, 30 Dec 2023 14:36:50 +0000 (14:36 +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 7e625c73ec0e127e0c7157cde7df94fe1df71405..0696339472c8773a7fcc6487d9e30faadceff66e 100644 (file)
@@ -426,7 +426,6 @@ static void mgmt_txn_req_free(struct mgmt_txn_req **txn_req)
 {
        int indx;
        struct mgmt_txn_reqs_head *req_list = NULL;
-       struct mgmt_txn_reqs_head *pending_list = NULL;
        enum mgmt_be_client_id id;
        struct mgmt_be_client_adapter *adapter;
        struct mgmt_commit_cfg_req *ccreq;
@@ -527,13 +526,7 @@ static void mgmt_txn_req_free(struct mgmt_txn_req **txn_req)
                break;
        }
 
-       if ((*txn_req)->pending_be_proc && pending_list) {
-               mgmt_txn_reqs_del(pending_list, *txn_req);
-               MGMTD_TXN_DBG("Removed req-id: %" PRIu64
-                             " from pending-list (left:%zu)",
-                             (*txn_req)->req_id,
-                             mgmt_txn_reqs_count(pending_list));
-       } else if (req_list) {
+       if (req_list) {
                mgmt_txn_reqs_del(req_list, *txn_req);
                MGMTD_TXN_DBG("Removed req-id: %" PRIu64
                              " from request-list (left:%zu)",