mirror of https://github.com/ArduPilot/ardupilot
parent
8ae2729022
commit
97b93920b3
|
@ -23,6 +23,7 @@ static void BM_Crop8bpp(benchmark::State& state)
|
||||||
new_buffer = (uint8_t *)malloc(state.range_x() * state.range_y());
|
new_buffer = (uint8_t *)malloc(state.range_x() * state.range_y());
|
||||||
if (!new_buffer) {
|
if (!new_buffer) {
|
||||||
fprintf(stderr, "error: couldn't malloc new_buffer\n");
|
fprintf(stderr, "error: couldn't malloc new_buffer\n");
|
||||||
|
free(buffer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,6 +51,7 @@ static void BM_YuyvToGrey(benchmark::State& state)
|
||||||
new_buffer = (uint8_t *)malloc(state.range_x() / 2);
|
new_buffer = (uint8_t *)malloc(state.range_x() / 2);
|
||||||
if (!new_buffer) {
|
if (!new_buffer) {
|
||||||
fprintf(stderr, "error: couldn't malloc new_buffer\n");
|
fprintf(stderr, "error: couldn't malloc new_buffer\n");
|
||||||
|
free(buffer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue