[misc] Move CHECK_NULL inside b64_decode (around the malloc)

To stay in line with general use of the macro
This commit is contained in:
ejurgensen 2018-12-29 16:39:52 +01:00
parent 271978f41a
commit 103dda29f3
2 changed files with 2 additions and 4 deletions

View File

@ -417,7 +417,7 @@ parse_item(struct input_metadata *m, const char *item)
if (data != &progress && data != &volume) if (data != &progress && data != &volume)
free(*data); free(*data);
CHECK_NULL(L_PLAYER, *data = b64_decode(s)); *data = b64_decode(s);
DPRINTF(E_DBG, L_PLAYER, "Read Shairport metadata (type=%8x, code=%8x): '%s'\n", type, code, *data); DPRINTF(E_DBG, L_PLAYER, "Read Shairport metadata (type=%8x, code=%8x): '%s'\n", type, code, *data);

View File

@ -738,9 +738,7 @@ b64_decode(const char *b64)
len = strlen(b64); len = strlen(b64);
str = (char *)malloc(len); CHECK_NULL(L_MISC, str = malloc(len));
if (!str)
return NULL;
memset(str, 0, len); memset(str, 0, len);