aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/gprpp
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2018-05-17 14:15:36 -0700
committerGravatar Mark D. Roth <roth@google.com>2018-05-17 14:40:02 -0700
commit290d35e1d2418ade8232d00d5303a7bb256fcb44 (patch)
tree43535de12aaf775aa8e7adc59c77981b79e26f47 /src/core/lib/gprpp
parent784e43507c46e1f7914bc84c30854e16f6f6e7c3 (diff)
C++-ify grpclb client stats.
Diffstat (limited to 'src/core/lib/gprpp')
-rw-r--r--src/core/lib/gprpp/memory.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/lib/gprpp/memory.h b/src/core/lib/gprpp/memory.h
index 1354109bf3..28fcdf1779 100644
--- a/src/core/lib/gprpp/memory.h
+++ b/src/core/lib/gprpp/memory.h
@@ -55,6 +55,7 @@ inline T* New(Args&&... args) {
// Alternative to delete, since we cannot use it (for fear of libstdc++)
template <typename T>
inline void Delete(T* p) {
+ if (p == nullptr) return;
p->~T();
if (alignof(T) > kAlignmentForDefaultAllocationInBytes) {
gpr_free_aligned(p);