From 31efbf9a59f19aee2c89ff9ca2e174e398c480d4 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 9 Oct 2019 21:17:27 +0200 Subject: [PATCH] coverity 226275 --- client/fileutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/fileutils.c b/client/fileutils.c index 273bedd3e..a8a1dc6ef 100644 --- a/client/fileutils.c +++ b/client/fileutils.c @@ -487,7 +487,7 @@ int loadFile_safe(const char *preferredName, const char *suffix, void **pdata, s } *pdata = calloc(fsize, sizeof(uint8_t)); - if (!pdata) { + if (!*pdata) { PrintAndLogEx(FAILED, "error, cannot allocate memory"); fclose(f); return PM3_EMALLOC;