aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-kbdc/string.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mds-kbdc/string.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mds-kbdc/string.c b/src/mds-kbdc/string.c
index 6ecf757..843757b 100644
--- a/src/mds-kbdc/string.c
+++ b/src/mds-kbdc/string.c
@@ -145,8 +145,7 @@ char32_t* string_dup(const char32_t* restrict string)
if (string == NULL)
return NULL;
n = string_length(string) + 1;
- fail_if (xmalloc(rc, n, char32_t));
- memcpy(rc, string, n * sizeof(char32_t));
+ fail_if (xmemdup(rc, string, n, char32_t));
return rc;
fail:
return NULL;