aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-kkbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mds-kkbd.c')
-rw-r--r--src/mds-kkbd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mds-kkbd.c b/src/mds-kkbd.c
index 1823f5c..afac365 100644
--- a/src/mds-kkbd.c
+++ b/src/mds-kkbd.c
@@ -368,8 +368,7 @@ int unmarshal_server(char* state_buf)
buf_get_next(state_buf, size_t, mapping_size);
if (mapping_size > 0)
{
- fail_if (xmalloc(mapping, mapping_size, int));
- memcpy(mapping, state_buf, mapping_size * sizeof(int));
+ fail_if (xmemdup(mapping, state_buf, mapping_size, int));
state_buf += mapping_size * sizeof(int) / sizeof(char);
}
fail_if (mds_message_unmarshal(&received, state_buf));