From 37f9fdc11c4e95d6a34cb515a454503256a82c63 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 28 Aug 2018 09:09:33 +0200 Subject: replace rtl_allocateMemory with std::malloc where used directly, since rtl_allocateMemory now just calls into std::malloc Change-Id: I59f85bdb7efdf6baa30e8fcd2370c0f8e9c999ad Reviewed-on: https://gerrit.libreoffice.org/59685 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sal/rtl/alloc_cache.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sal/rtl/alloc_cache.cxx') diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx index d1eaf44cd142..1f165cca161c 100644 --- a/sal/rtl/alloc_cache.cxx +++ b/sal/rtl/alloc_cache.cxx @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -144,13 +145,13 @@ void * SAL_CALL rtl_cache_alloc(rtl_cache_type * cache) SAL_THROW_EXTERN_C() if (!cache) return nullptr; - obj = rtl_allocateMemory(cache->m_type_size); + obj = std::malloc(cache->m_type_size); if (obj && cache->m_constructor) { if (!(cache->m_constructor)(obj, cache->m_userarg)) { /* construction failure */ - rtl_freeMemory(obj); + std::free(obj); obj = nullptr; } } @@ -169,7 +170,7 @@ void SAL_CALL rtl_cache_free( /* destruct object */ (cache->m_destructor)(obj, cache->m_userarg); } - rtl_freeMemory(obj); + std::free(obj); } } -- cgit