From 788cb6f13308f91b902ba0a1a157ed9539be49eb Mon Sep 17 00:00:00 2001 From: chme Date: Thu, 27 Dec 2018 08:56:18 +0100 Subject: [PATCH] [pipe/raop] Check for NULL to avoid scan-build issues (in case of oom) --- src/inputs/pipe.c | 2 +- src/outputs/raop.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inputs/pipe.c b/src/inputs/pipe.c index 99c1685a..621f04af 100644 --- a/src/inputs/pipe.c +++ b/src/inputs/pipe.c @@ -417,7 +417,7 @@ parse_item(struct input_metadata *m, const char *item) if (data != &progress && data != &volume) free(*data); - *data = b64_decode(s); + CHECK_NULL(L_PLAYER, *data = b64_decode(s)); DPRINTF(E_DBG, L_PLAYER, "Read Shairport metadata (type=%8x, code=%8x): '%s'\n", type, code, *data); diff --git a/src/outputs/raop.c b/src/outputs/raop.c index 21dc01c7..61b5f0eb 100644 --- a/src/outputs/raop.c +++ b/src/outputs/raop.c @@ -4730,7 +4730,7 @@ raop_device_cb(const char *name, const char *type, const char *domain, const cha p = keyval_get(txt, "et"); if (p) { - et = strdup(p); + CHECK_NULL(L_RAOP, et = strdup(p)); token = strtok_r(et, ",", &ptr); while (token) {