diff options
author | Vinoth Jayaram <quic_c_vinoja@quicinc.com> | 2024-01-19 17:32:59 +0530 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2024-03-20 01:30:25 +0800 |
commit | 659376e522e2f652d9c0224d606cdc6e29b4a370 (patch) | |
tree | 81a9594387bdf31e2dc23084bb85f9e5fa32f75a /services/config/src/device_impl.cpp | |
parent | 7e49c7ff22a0113ba997748f648dff5ede75f60c (diff) |
This deletes device_obj_ to release the memory appropriately
on init failure case.
Change-Id: Ide62aed02c7fcf9fbb8d4376c805fc50277b00cc
(cherry picked from commit b9e509cba1691d24d8cc06625eff4e1ee25eee51)
Diffstat (limited to 'services/config/src/device_impl.cpp')
-rw-r--r-- | services/config/src/device_impl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/services/config/src/device_impl.cpp b/services/config/src/device_impl.cpp index 4541368..2361ab0 100644 --- a/services/config/src/device_impl.cpp +++ b/services/config/src/device_impl.cpp @@ -85,6 +85,7 @@ int DeviceImpl::CreateInstance(ClientContext *intf) { android::status_t status = device_obj_->IDisplayConfig::registerAsService(); // Unable to start Display Config 2.0 service. Fail Init. if (status != android::OK) { + delete device_obj_; device_obj_ = nullptr; return -1; } |