From 602bff55e0da64b3fb7d6b3b4d580a430c17298f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 24 Aug 2015 01:18:23 +0200 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-colour.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2