else
{
DRM_TAPPS_LOG("no connection exists.. pairCount=[%ld]", pairCount);
- pDBConnectionInfo = NEW DtappsDBConnectionInfo;
+ pDBConnectionInfo = new(std::nothrow) DtappsDBConnectionInfo;
MTRY_BL(NULL != pDBConnectionInfo);
IsMemAllocated = true; // prevent fix
MCATCH_B
- if (true == IsMemAllocated)
- {
- MDELETE(pDBConnectionInfo);
- }
+ if (IsMemAllocated && pDBConnectionInfo)
+ delete pDBConnectionInfo;
+
DRM_TAPPS_EXCEPTION("This fn fails");
return FALSE;