aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-colour.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mds-colour.c')
-rw-r--r--src/mds-colour.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mds-colour.c b/src/mds-colour.c
index 469cf43..57fa1ee 100644
--- a/src/mds-colour.c
+++ b/src/mds-colour.c
@@ -602,8 +602,7 @@ static inline size_t colour_list_subunmarshal(colour_list_entry_t* entry, char*
data += sizeof(colour_t) / sizeof(char);
while (data[n++]);
n *= sizeof(char);
- entry->key = malloc(n);
- if (entry->key == NULL)
+ if (xbmalloc(entry->key, n))
return 0;
memcpy(entry->key, data, n);
return sizeof(colour_t) + n;