mirror of
https://github.com/tstack/lnav
synced 2024-11-03 23:15:38 +00:00
[test] fix a leak
This commit is contained in:
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…
Reference in New Issue
Block a user