if (m_pInstance != NULL)
return m_pInstance;
- m_pInstance = new (std::nothrow) DrmFileMgr();
+ m_pInstance = new(std::nothrow) DrmFileMgr();
+
if (m_pInstance == NULL) {
DRM_TAPPS_EXCEPTION("Creating DrmFileMgr m_pInstance failed.");
return NULL;
return TADC_PARAMETER_ERROR;
}
- auto pDrmFileHandler = new (std::nothrow) DrmFileHandler();
+ auto pDrmFileHandler = new(std::nothrow) DrmFileHandler();
+
if (pDrmFileHandler == NULL) {
DRM_TAPPS_EXCEPTION("DrmFileHandler allocation failed.");
return TADC_MEMAlOC_ERROR;
}
auto &pHandler = m_HandlerMap[key];
+
if (pHandler != NULL)
delete pHandler;