From 2ce899c54f803600f8d63318210036e004170b72 Mon Sep 17 00:00:00 2001 From: bugobliterator Date: Tue, 17 Mar 2020 06:06:54 +0800 Subject: [PATCH] AP_Common: use standard realloc method from HAL --- libraries/AP_Common/AP_ExpandingArray.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Common/AP_ExpandingArray.cpp b/libraries/AP_Common/AP_ExpandingArray.cpp index 4a8ad43cf3..b5327c6f91 100644 --- a/libraries/AP_Common/AP_ExpandingArray.cpp +++ b/libraries/AP_Common/AP_ExpandingArray.cpp @@ -38,7 +38,7 @@ bool AP_ExpandingArrayGeneric::expand(uint16_t num_chunks) // fail if reallocating would leave less than 100 bytes of memory free return false; } - chunk_ptr_t *chunk_ptrs_new = (chunk_ptr_t*)realloc(chunk_ptrs, chunk_ptr_size * sizeof(chunk_ptr_t)); + chunk_ptr_t *chunk_ptrs_new = (chunk_ptr_t*)hal.util->std_realloc((void*)chunk_ptrs, chunk_ptr_size * sizeof(chunk_ptr_t)); if (chunk_ptrs_new == nullptr) { return false; }