mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 00:05:03 -05:00
[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:
parent
271978f41a
commit
103dda29f3
@ -417,7 +417,7 @@ parse_item(struct input_metadata *m, const char *item)
|
||||
if (data != &progress && data != &volume)
|
||||
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);
|
||||
|
||||
|
@ -738,9 +738,7 @@ b64_decode(const char *b64)
|
||||
|
||||
len = strlen(b64);
|
||||
|
||||
str = (char *)malloc(len);
|
||||
if (!str)
|
||||
return NULL;
|
||||
CHECK_NULL(L_MISC, str = malloc(len));
|
||||
|
||||
memset(str, 0, len);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user