[test] fix a leak

pull/870/head
Timothy Stack 3 years ago
parent d3d527d290
commit 76ce111d48

@ -183,6 +183,9 @@ public:
}
void expand_by(size_t amount) {
if (amount == 0) {
return;
}
auto new_size = this->ab_size + amount;
auto new_buffer = (char *) realloc(this->ab_buffer, new_size);

@ -78,6 +78,7 @@ Result<auto_buffer, std::string> uncompress(const std::string& src,
if (err == Z_STREAM_END) {
done = true;
} else if (err != Z_OK) {
inflateEnd(&strm);
return Err(fmt::format("unable to uncompress: {} -- {}",
src, strm.msg ? strm.msg : zError(err)));
}

Loading…
Cancel
Save