From 0b4f7573d2219925768a03d10c022862052a2288 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Mon, 5 Apr 2021 20:07:25 +0200 Subject: [PATCH] no need to handle null result in alloc_buf --- src/cs_strman.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/cs_strman.cc b/src/cs_strman.cc index 2655844..e53048a 100644 --- a/src/cs_strman.cc +++ b/src/cs_strman.cc @@ -95,9 +95,6 @@ std::string_view string_pool::get(char const *ptr) const { char *string_pool::alloc_buf(std::size_t len) const { auto mem = cstate->alloc(nullptr, 0, len + sizeof(string_ref_state) + 1); - if (!mem) { - throw internal_error{"allocation failed"}; - } /* write length and initial refcount */ auto *sst = static_cast(mem); sst->length = len;