[smartpl] calloc error check to avoid Coverity warning

This commit is contained in:
ejurgensen 2022-01-31 00:43:41 +01:00
parent 4d8eed49a3
commit 410fa4b80e

View File

@ -63,7 +63,8 @@ smartpl_query_parse_file(struct smartpl *smartpl, const char *file)
} }
fseek(f, 0, SEEK_SET); 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); got = fread(expression, 1, size, f);
if (got != size) if (got != size)