mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-25 09:25:57 +02:00
fixed an unlikely potential memory leak if one of two new fails
This commit is contained in:
parent
efd9d539e5
commit
d59ff2ac1e
@ -158,11 +158,13 @@ public:
|
|||||||
if (it == _map.end())
|
if (it == _map.end())
|
||||||
{
|
{
|
||||||
LibraryInfo li;
|
LibraryInfo li;
|
||||||
li.pLibrary = new SharedLibrary(path);
|
li.pLibrary = 0;
|
||||||
li.pManifest = new Manif();
|
li.pManifest = 0;
|
||||||
li.refCount = 1;
|
li.refCount = 1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
li.pLibrary = new SharedLibrary(path);
|
||||||
|
li.pManifest = new Manif();
|
||||||
std::string pocoBuildManifestSymbol("pocoBuildManifest");
|
std::string pocoBuildManifestSymbol("pocoBuildManifest");
|
||||||
pocoBuildManifestSymbol.append(manifest);
|
pocoBuildManifestSymbol.append(manifest);
|
||||||
if (li.pLibrary->hasSymbol("pocoInitializeLibrary"))
|
if (li.pLibrary->hasSymbol("pocoInitializeLibrary"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user