diff options
author | Noel Grandin <noel@peralex.com> | 2014-07-18 14:01:12 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-07-18 14:24:20 +0200 |
commit | dac4af0e0f7f167850a5b30ae914947634213d22 (patch) | |
tree | de269b9fe0c95f12ab929c6abc5eb0736b61c667 /registry/source | |
parent | 0532c5a897615320c5b1727d1867d9fbc574c22c (diff) |
cid#705674 and cid#705675 Resource leak
Change-Id: Id97e5de8433cc5dc9cb72c0d447ce6af50eb4918
Diffstat (limited to 'registry/source')
-rw-r--r-- | registry/source/registry.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx index d3ba33d3a81c..d7d77b22002f 100644 --- a/registry/source/registry.cxx +++ b/registry/source/registry.cxx @@ -514,6 +514,7 @@ REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_createRegistry(rtl_uString* registr ORegistry* pReg = new ORegistry(); if ((ret = pReg->initRegistry(registryName, REG_CREATE))) { + delete pReg; *phRegistry = NULL; return ret; } @@ -563,6 +564,7 @@ REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_openRegistry(rtl_uString* registryN ORegistry* pReg = new ORegistry(); if ((_ret = pReg->initRegistry(registryName, accessMode))) { + delete pReg; *phRegistry = NULL; return _ret; } |