]> git.puffer.fish Git - matthieu/frr.git/commitdiff
mgmtd: fix sending the same value to multiple clients
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 24 Jan 2024 21:03:24 +0000 (23:03 +0200)
committerChristian Hopps <chopps@labn.net>
Fri, 26 Jan 2024 17:34:46 +0000 (12:34 -0500)
The value should not be cleared after sending it to the first client,
otherwise other clients receive an empty string.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
mgmtd/mgmt_txn.c

index c19b39c6966d6922972d786b32f927629b3b25fb..f04dec07bfe812a214c81dcc4b4d61cc9d3c4115 100644 (file)
@@ -925,7 +925,6 @@ static int mgmt_txn_create_config_batches(struct mgmt_txn_req *txn_req,
                                MGMTD__YANG_DATA_VALUE__VALUE_ENCODED_STR_VAL;
                        batch->value[batch->num_cfg_data].encoded_str_val =
                                value;
-                       value = NULL;
 
                        MGMTD_TXN_DBG(" -- %s, batch item:%d", adapter->name,
                                      (int)batch->num_cfg_data);