mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
remove manually freeing the variable mDeathRecipient
The variable `mDeathRecipient` will automatically free the allocated memory when it is destructed. This CL deletes the code for manually releasing the variable `mDeathRecipient` to avoid the same variable being freed twice. Bug: 296617022 Test: Run fuzzer test. Change-Id: I733f7f8d26e48a9434d41c5098f39ad91208abeb
This commit is contained in:
@@ -59,10 +59,6 @@ ThreadChip::ThreadChip(char* url) : mUrl(), mRxFrameBuffer(), mCallback(nullptr)
|
||||
AIBinder_DeathRecipient_setOnUnlinked(mDeathRecipient.get(), ThreadChip::onBinderUnlinkedJump);
|
||||
}
|
||||
|
||||
ThreadChip::~ThreadChip() {
|
||||
AIBinder_DeathRecipient_delete(mDeathRecipient.get());
|
||||
}
|
||||
|
||||
void ThreadChip::onBinderDiedJump(void* context) {
|
||||
reinterpret_cast<ThreadChip*>(context)->onBinderDied();
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace threadnetwork {
|
||||
class ThreadChip : public BnThreadChip, ot::Posix::Mainloop::Source {
|
||||
public:
|
||||
ThreadChip(char* url);
|
||||
~ThreadChip();
|
||||
~ThreadChip() {}
|
||||
|
||||
ndk::ScopedAStatus open(const std::shared_ptr<IThreadChipCallback>& in_callback) override;
|
||||
ndk::ScopedAStatus close() override;
|
||||
|
||||
Reference in New Issue
Block a user