From 2be892bfda98b0a765f4ae8046ede7e132344dc1 Mon Sep 17 00:00:00 2001 From: Takatoshi Kondo Date: Mon, 3 Feb 2014 11:07:26 +0900 Subject: [PATCH] Removed a redundant null pointer check. --- cpp11/zone.hpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cpp11/zone.hpp b/cpp11/zone.hpp index a5635450..a152ae87 100644 --- a/cpp11/zone.hpp +++ b/cpp11/zone.hpp @@ -233,10 +233,6 @@ inline void* zone::allocate_expand(size_t size) if (!c) return nullptr; char* ptr = reinterpret_cast(c) + sizeof(chunk); - if (!ptr) { - ::free(c); - return nullptr; - } c->next_ = cl->head_; cl->head_ = c;