diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx index d7d77b22002f..803372fa8028 100644 --- a/registry/source/registry.cxx +++ b/registry/source/registry.cxx @@ -118,6 +118,7 @@ static RegError REGISTRY_CALLTYPE createRegistry(rtl_uString* registryName, ORegistry* pReg = new ORegistry(); if ((ret = pReg->initRegistry(registryName, REG_CREATE))) { + delete pReg; *phRegistry = NULL; return ret; }