aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-kbdc/raw-data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mds-kbdc/raw-data.c')
-rw-r--r--src/mds-kbdc/raw-data.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mds-kbdc/raw-data.c b/src/mds-kbdc/raw-data.c
index 52bec82..cf48486 100644
--- a/src/mds-kbdc/raw-data.c
+++ b/src/mds-kbdc/raw-data.c
@@ -489,8 +489,7 @@ char* parse_raw_string(const char* restrict string)
* but when parsed it generateds 2 bytes in UTF-8, and their
* is not code point whose UTF-8 encoding is longer than its
* hexadecimal representation. */
- p = rc = malloc(strlen(string) * sizeof(char));
- fail_if (rc == NULL);
+ fail_if (xmalloc(p = rc, strlen(string), char));
while ((c = *string++))
if (r(escape == 8, '0', '7')) buf = (buf << 3) | (c & 15);