Merge tag 'LA.QSSI.14.0.r1-13400-qssi.0' into staging/lineage-21.0_merge-LA.QSSI.14.0.r1-13400-qssi.0
"LA.QSSI.14.0.r1-13400-qssi.0"
# By Vinoth Jayaram
# Via Linux Build Service Account (1) and Vinoth Jayaram (1)
* tag 'LA.QSSI.14.0.r1-13400-qssi.0':
commonsys: services: Delete device_obj_ to release the memory
Change-Id: Ie48cd2f76bb6835012917c40afffceb87e79c183
diff --git a/services/config/src/device_impl.cpp b/services/config/src/device_impl.cpp
index 5d1fcdd..b0da5a8 100644
--- a/services/config/src/device_impl.cpp
+++ b/services/config/src/device_impl.cpp
@@ -86,6 +86,7 @@
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;
}