swifi: Fix incorrect memset
Change-Id: I6764aff558f51cdb90b91a3e71c982e8b3f47058
This commit is contained in:
parent
056ece2898
commit
80c94e3974
1 changed files with 3 additions and 3 deletions
|
@ -66,14 +66,14 @@ main(int argc, char * argv[])
|
|||
goto Usage;
|
||||
}
|
||||
}
|
||||
|
||||
res = malloc(arg * sizeof(swifi_result_t));
|
||||
size_t ressize = arg * sizeof(swifi_result_t);
|
||||
res = malloc(ressize);
|
||||
if (res == NULL) {
|
||||
printf("Out of memory\n");
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
memset(res, 0, sizeof(res));
|
||||
memset(res, 0, ressize);
|
||||
|
||||
/*
|
||||
// Find out where the faults will be injected
|
||||
|
|
Loading…
Reference in a new issue