Skip to content

Commit f8f1906

Browse files
Anton IvanovAndroid (Google) Code Review
authored andcommitted
Merge "Harden construction sites of android::StrongPointer." into main
2 parents 670a821 + b3ff767 commit f8f1906

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libs/binder/include/binder/SafeInterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class LIBBINDER_EXPORTED ParcelHandler {
7979
template <typename T>
8080
typename std::enable_if<std::is_base_of<Flattenable<T>, T>::value, status_t>::type read(
8181
const Parcel& parcel, sp<T>* t) const {
82-
*t = new T{};
82+
*t = sp<T>::make();
8383
return callParcel("read(sp<Flattenable>)", [&]() { return parcel.read(*(t->get())); });
8484
}
8585
template <typename T>

0 commit comments

Comments
 (0)