Plane: use calloc in preferance to malloc

This commit is contained in:
Andrew Tridgell 2018-01-17 08:10:23 +11:00
parent 8fea99e1da
commit 5614fd1ccc

View File

@ -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;
}