mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 02:46:26 +00:00
lib: fix "use of uninitialised value" valgrind warning
When FRR is built without the --enable-config-rollbacks option, the nb_db_transaction_save() function does nothing and the "transaction_id" output parameter is left uninitialized. For this reason, all northbound clients should initialize the "transaction_id" argument before calling nb_candidate_commit() or nb_candidate_commit_apply() (except when a NULL pointer is given, which is the case of the confd and sysrepo plugins). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
ec348d4344
commit
f65fb6b4b4
@ -261,7 +261,7 @@ static int nb_cli_confirmed_commit_timeout(struct thread *thread)
|
||||
static int nb_cli_commit(struct vty *vty, bool force,
|
||||
unsigned int confirmed_timeout, char *comment)
|
||||
{
|
||||
uint32_t transaction_id;
|
||||
uint32_t transaction_id = 0;
|
||||
int ret;
|
||||
|
||||
/* Check if there's a pending confirmed commit. */
|
||||
|
Loading…
Reference in New Issue
Block a user