Use the real size of res
This commit is contained in:
parent
09614bba41
commit
75a7082c90
|
|
@ -66,14 +66,14 @@ main(int argc, char * argv[])
|
||||||
goto Usage;
|
goto Usage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
size_t ressize = arg * sizeof(swifi_result_t);
|
||||||
res = malloc(arg * sizeof(swifi_result_t));
|
res = malloc(ressize);
|
||||||
if (res == NULL) {
|
if (res == NULL) {
|
||||||
printf("Out of memory\n");
|
printf("Out of memory\n");
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(res, 0, sizeof(*res));
|
memset(res, 0, sizeof(ressize));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// Find out where the faults will be injected
|
// Find out where the faults will be injected
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user