diff options
author | Alec Edgington <alec.m.edgington@gmail.com> | 2018-06-14 21:03:14 +0100 |
---|---|---|
committer | Alec Edgington <alec.m.edgington@gmail.com> | 2018-06-14 21:21:30 +0100 |
commit | af78948c8c9d64685f3d62a501c50b89550ee098 (patch) | |
tree | 2952e46e95c05766e0d483a9a157c275a0d03df0 | |
parent | 7c767ca994ac59a83cc4911ec450f6606cbc60c9 (diff) | |
download | libhidl-af78948c8c9d64685f3d62a501c50b89550ee098.tar.gz |
Don't call the destructor on the base class.
Not only is this unnecessary (since the base-class destructor is
called automatically), but it is probably undefined behaviour, as
it leads to the base-class destructor being called twice.
Although clang doesn't complain about this, gcc gives a compilation
error (albeit with a highly confusing message).
Test: No compilation error from gcc.
Change-Id: I5043630335d0b09b08d4272794f292ed98541b87
Signed-off-by: Alec Edgington <alec.m.edgington@gmail.com>
-rw-r--r-- | base/HidlSupport.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/base/HidlSupport.cpp b/base/HidlSupport.cpp index a69faa2..eb4368f 100644 --- a/base/HidlSupport.cpp +++ b/base/HidlSupport.cpp @@ -315,9 +315,7 @@ HidlMemory::HidlMemory(const hidl_string& name, hidl_handle&& handle, size_t siz : hidl_memory(name, std::move(handle), size) {} // it's required to have at least one out-of-line method to avoid weak vtable -HidlMemory::~HidlMemory() { - hidl_memory::~hidl_memory(); -} +HidlMemory::~HidlMemory() {} } // namespace hardware } // namespace android |