mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 13:23:44 +00:00
lib: copy xpaths when enqueing changes
Just copying th const char* of the xpath means that if we are enqueing multiple changes from a buffer, the last xpath addedd will overwrite all of the previous references. Copying the xpath to a buffer simplifies the API when retrofitting the commands. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
This commit is contained in:
parent
625b70e3da
commit
8427e0e674
@ -71,7 +71,7 @@ void nb_cli_enqueue_change(struct vty *vty, const char *xpath,
|
||||
}
|
||||
|
||||
change = &vty->cfg_changes[vty->num_cfg_changes++];
|
||||
change->xpath = xpath;
|
||||
strlcpy(change->xpath, xpath, sizeof(change->xpath));
|
||||
change->operation = operation;
|
||||
change->value = value;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user