From f6de196c21a193db5400220f3636fad0875f6d5a Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Thu, 25 Jun 2015 10:21:07 +0200 Subject: [PATCH] config: also clone associated id when cloning node using dm_config_clone_node{_with_mem} --- libdm/libdm-config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libdm/libdm-config.c b/libdm/libdm-config.c index 7b2897212..f1636776c 100644 --- a/libdm/libdm-config.c +++ b/libdm/libdm-config.c @@ -1308,6 +1308,8 @@ struct dm_config_node *dm_config_clone_node_with_mem(struct dm_pool *mem, const return NULL; } + new_cn->id = cn->id; + if ((cn->v && !(new_cn->v = _clone_config_value(mem, cn->v))) || (cn->child && !(new_cn->child = dm_config_clone_node_with_mem(mem, cn->child, 1))) || (siblings && cn->sib && !(new_cn->sib = dm_config_clone_node_with_mem(mem, cn->sib, siblings))))