summaryrefslogtreecommitdiffstats
path: root/libcxx/src/new.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/src/new.cpp')
-rw-r--r--libcxx/src/new.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/libcxx/src/new.cpp b/libcxx/src/new.cpp
index 8013d89ae3c..35f481db08a 100644
--- a/libcxx/src/new.cpp
+++ b/libcxx/src/new.cpp
@@ -135,8 +135,7 @@ _LIBCPP_WEAK
void
operator delete(void* ptr) _NOEXCEPT
{
- if (ptr)
- ::free(ptr);
+ ::free(ptr);
}
_LIBCPP_WEAK
@@ -257,11 +256,10 @@ _LIBCPP_WEAK
void
operator delete(void* ptr, std::align_val_t) _NOEXCEPT
{
- if (ptr)
#if defined(_LIBCPP_MSVCRT_LIKE)
- ::_aligned_free(ptr);
+ ::_aligned_free(ptr);
#else
- ::free(ptr);
+ ::free(ptr);
#endif
}
OpenPOWER on IntegriCloud