Fix possible memory leaks

Fix possible memory leaks
This commit is contained in:
wincsb 2022-11-16 13:50:03 +08:00 committed by GitHub
parent 8abf0f2409
commit b478c278a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
/**
/**
* Tencent is pleased to support the open source community by making Tars available.
*
* Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.
@ -41,7 +41,7 @@ void TC_NetWorkBuffer::Buffer::alloc(size_t len)
_capacity = len;
if(_buffer)
{
delete _buffer;
delete[] _buffer;
_buffer = NULL;
}
}