mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
Plane: use calloc in preferance to malloc
This commit is contained in:
parent
8fea99e1da
commit
5614fd1ccc
@ -271,7 +271,7 @@ bool Plane::setup_failsafe_mixing(void)
|
||||
unsigned mixer_status = 0;
|
||||
uint16_t manual_mask = uint16_t(g2.manual_rc_mask.get());
|
||||
|
||||
buf = (char *)malloc(buf_size);
|
||||
buf = (char *)calloc(1, buf_size);
|
||||
if (buf == nullptr) {
|
||||
goto failed;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user