From 410fa4b80e795bfceca5fb692d3f5a025a40b77d Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Mon, 31 Jan 2022 00:43:41 +0100 Subject: [PATCH] [smartpl] calloc error check to avoid Coverity warning --- src/smartpl_query.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/smartpl_query.c b/src/smartpl_query.c index b0411d5d..98ecdee6 100644 --- a/src/smartpl_query.c +++ b/src/smartpl_query.c @@ -63,7 +63,8 @@ smartpl_query_parse_file(struct smartpl *smartpl, const char *file) } fseek(f, 0, SEEK_SET); - expression = calloc(1, size + 1); + + CHECK_NULL(L_SCAN, expression = calloc(1, size + 1)); got = fread(expression, 1, size, f); if (got != size)