!3639 [HUST_CSE]fix: double_free

Merge pull request !3639 from xy420/fix_double_free
This commit is contained in:
openharmony_ci 2023-05-04 06:56:26 +00:00 committed by Gitee
commit c5a67dfc77
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -43,7 +43,7 @@ namespace OHOS {
char *ext = new char[Communication::SoftBus::MAX_STREAM_LEN + 1];
if (ext == nullptr) {
delete []buf;
ext = nullptr;
buf = nullptr;
return;
}
std::unique_ptr<char[]> inputext (ext);