cid#705674 and cid#705675 Resource leak
Change-Id: Id97e5de8433cc5dc9cb72c0d447ce6af50eb4918
This commit is contained in:
parent
0532c5a897
commit
dac4af0e0f
1 changed files with 2 additions and 0 deletions
|
@ -514,6 +514,7 @@ REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_createRegistry(rtl_uString* registr
|
||||||
ORegistry* pReg = new ORegistry();
|
ORegistry* pReg = new ORegistry();
|
||||||
if ((ret = pReg->initRegistry(registryName, REG_CREATE)))
|
if ((ret = pReg->initRegistry(registryName, REG_CREATE)))
|
||||||
{
|
{
|
||||||
|
delete pReg;
|
||||||
*phRegistry = NULL;
|
*phRegistry = NULL;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -563,6 +564,7 @@ REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_openRegistry(rtl_uString* registryN
|
||||||
ORegistry* pReg = new ORegistry();
|
ORegistry* pReg = new ORegistry();
|
||||||
if ((_ret = pReg->initRegistry(registryName, accessMode)))
|
if ((_ret = pReg->initRegistry(registryName, accessMode)))
|
||||||
{
|
{
|
||||||
|
delete pReg;
|
||||||
*phRegistry = NULL;
|
*phRegistry = NULL;
|
||||||
return _ret;
|
return _ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue