diff options
Diffstat (limited to 'nuttx/libxx/libxx_cxa_atexit.cxx')
-rw-r--r-- | nuttx/libxx/libxx_cxa_atexit.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nuttx/libxx/libxx_cxa_atexit.cxx b/nuttx/libxx/libxx_cxa_atexit.cxx index cd31f94f6..d7a82fe5b 100644 --- a/nuttx/libxx/libxx_cxa_atexit.cxx +++ b/nuttx/libxx/libxx_cxa_atexit.cxx @@ -39,7 +39,6 @@ #include <nuttx/config.h> -#include <cstdlib> #include <cassert> #include "libxx_internal.hxx" @@ -91,7 +90,7 @@ extern "C" DEBUGASSERT(alloc && alloc->func); alloc->func(alloc->arg); - free(alloc); + lib_free(alloc); } #endif @@ -124,7 +123,7 @@ extern "C" // information. FAR struct __cxa_atexit_s *alloc = - (FAR struct __cxa_atexit_s *)malloc(sizeof(struct __cxa_atexit_s)); + (FAR struct __cxa_atexit_s *)lib_malloc(sizeof(struct __cxa_atexit_s)); if (alloc) { |