mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-23 08:49:59 +00:00
!3639 [HUST_CSE]fix: double_free
Merge pull request !3639 from xy420/fix_double_free
This commit is contained in:
commit
c5a67dfc77
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user