coverity 226275

This commit is contained in:
Philippe Teuwen 2019-10-09 21:17:27 +02:00
commit 31efbf9a59

View file

@ -487,7 +487,7 @@ int loadFile_safe(const char *preferredName, const char *suffix, void **pdata, s
} }
*pdata = calloc(fsize, sizeof(uint8_t)); *pdata = calloc(fsize, sizeof(uint8_t));
if (!pdata) { if (!*pdata) {
PrintAndLogEx(FAILED, "error, cannot allocate memory"); PrintAndLogEx(FAILED, "error, cannot allocate memory");
fclose(f); fclose(f);
return PM3_EMALLOC; return PM3_EMALLOC;