chg: use calloc

This commit is contained in:
iceman1001 committed 2019-01-30 20:18:50 +01:00
1 parent 8991fa172d
commit 18db34ffb0
3 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -404,7 +404,7 @@ int CmdHFiClassSim(const char *Cmd) {
break;
size_t datalen = NUM_CSNS * 24;
void* dump = malloc(datalen);
void* dump = calloc(datalen, sizeof(uint8_t));
if ( !dump ) {
PrintAndLogEx(WARNING, "Failed to allocate memory");
return 2;
@@ -456,7 +456,7 @@ int CmdHFiClassSim(const char *Cmd) {
break;
size_t datalen = NUM_CSNS * 24;
void* dump = malloc(datalen);
void* dump = calloc(datalen, sizeof(uint8_t));
if ( !dump ) {
PrintAndLogEx(WARNING, "Failed to allocate memory");
return 2;