Skip to content

Commit

Permalink
修复可能引起的堆内存泄漏
Browse files Browse the repository at this point in the history
  • Loading branch information
edisenwangK committed Apr 20, 2024
1 parent c8b8201 commit a396ea8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/src/tc_gzip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bool TC_GZip::compress(const char *src, size_t length, string& buffer)
static char gz_simple_header[] = { '\037', '\213', '\010', '\000', '\000', '\000', '\000', '\000', '\002', '\377' };

size_t destLen = sizeof(gz_simple_header) + length * 2;
char *out = new char[destLen + 1];
char *out = new char[destLen + 1 + 8];

stream.next_out = (Bytef *)out;
stream.avail_out = destLen;
Expand Down

0 comments on commit a396ea8

Please sign in to comment.