aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-kbdc/include-stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mds-kbdc/include-stack.c')
-rw-r--r--src/mds-kbdc/include-stack.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mds-kbdc/include-stack.c b/src/mds-kbdc/include-stack.c
index b34b57b..d9225a3 100644
--- a/src/mds-kbdc/include-stack.c
+++ b/src/mds-kbdc/include-stack.c
@@ -199,8 +199,7 @@ mds_kbdc_include_stack_t* mds_kbdc_include_stack_save(void)
if (latest_save->ptr == 0)
return latest_save;
- fail_if (xmalloc(latest_save->stack, latest_save->ptr, const mds_kbdc_tree_include_t*));
- memcpy(latest_save->stack, includes, latest_save->ptr * sizeof(const mds_kbdc_tree_include_t*));
+ fail_if (xmemdup(latest_save->stack, includes, latest_save->ptr, const mds_kbdc_tree_include_t*));
return latest_save;
fail: