add a nothrow

Signed-off-by: zhaolinglan <zhaolinglan@huawei.com>
This commit is contained in:
zhaolinglan 2022-07-21 08:37:54 +08:00
parent 7d7c866685
commit bc1daf879c

View File

@ -315,7 +315,7 @@ namespace MiscServices {
int32_t uid = IPCSkeleton::GetCallingUid();
int32_t userId = getUserId(uid);
auto *parcel = new MessageParcel();
auto *parcel = new (std::nothrow) MessageParcel();
InputMethodProperty *target = InputMethodProperty::Unmarshalling(data);
parcel->WriteInt32(userId);
if (!target->Marshalling(*parcel)) {