!1287 指针内存初始化

Merge pull request !1287 from yanghang/master
This commit is contained in:
openharmony_ci 2024-08-22 01:23:44 +00:00 committed by Gitee
commit a8dc468dbe
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 0 deletions

View File

@ -47,7 +47,9 @@ DBinderCallbackStub::DBinderCallbackStub(const std::string &service, const std::
dbinderData_ = std::make_unique<uint8_t[]>(sizeof(dbinder_negotiation_data));
if (dbinderData_ == nullptr) {
ZLOGE(LOG_LABEL, "malloc dbinderData_ fail");
return;
}
memset_s(dbinderData_.get(), sizeof(dbinder_negotiation_data), 0, sizeof(dbinder_negotiation_data));
}
DBinderCallbackStub::~DBinderCallbackStub()

View File

@ -41,7 +41,9 @@ DBinderServiceStub::DBinderServiceStub(const std::string &service, const std::st
dbinderData_ = std::make_unique<uint8_t[]>(sizeof(dbinder_negotiation_data));
if (dbinderData_ == nullptr) {
DBINDER_LOGW(LOG_LABEL, "malloc dbinderData_ fail");
return;
}
memset_s(dbinderData_.get(), sizeof(dbinder_negotiation_data), 0, sizeof(dbinder_negotiation_data));
}
DBinderServiceStub::~DBinderServiceStub()