mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 00:56:19 +00:00
Merge pull request #14789 from FRRouting/mergify/bp/stable/9.1/pr-14767
lib: fix possible freeing of libyang data (backport #14767)
This commit is contained in:
commit
de607853c8
@ -842,6 +842,7 @@ void nb_candidate_edit_config_changes(
|
|||||||
struct nb_cfg_change *change = &cfg_changes[i];
|
struct nb_cfg_change *change = &cfg_changes[i];
|
||||||
struct nb_node *nb_node;
|
struct nb_node *nb_node;
|
||||||
char xpath[XPATH_MAXLEN];
|
char xpath[XPATH_MAXLEN];
|
||||||
|
const char *value;
|
||||||
struct yang_data *data;
|
struct yang_data *data;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -879,9 +880,10 @@ void nb_candidate_edit_config_changes(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If the value is not set, get the default if it exists. */
|
/* If the value is not set, get the default if it exists. */
|
||||||
if (change->value == NULL)
|
value = change->value;
|
||||||
change->value = yang_snode_get_default(nb_node->snode);
|
if (value == NULL)
|
||||||
data = yang_data_new(xpath, change->value);
|
value = yang_snode_get_default(nb_node->snode);
|
||||||
|
data = yang_data_new(xpath, value);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ignore "not found" errors when editing the candidate
|
* Ignore "not found" errors when editing the candidate
|
||||||
|
Loading…
Reference in New Issue
Block a user