summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-28 09:09:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-29 09:05:39 +0200
commit37f9fdc11c4e95d6a34cb515a454503256a82c63 (patch)
tree35099c65caf4c62451a5b7a7c0bac249473c9733 /sal
parent4c91b89d8ce9c34179f31854dc88bd0a9fa84cba (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/alloc_cache.cxx7
1 files changed, 4 insertions, 3 deletions
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 <rtllifecycle.h>
#include <cassert>
+#include <cstdlib>
#include <string.h>
#include <stdio.h>
@@ -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);
}
}