Change-Id: I0e7125ad2e28695f28eb0742fc9acc3ad422f5d1
dl_genErrorMessage(L"link", iErr, pwstLibName);
/* release lib if it is a new link */
- if (iIDSharedLib == -1)
+ if ((iIDSharedLib == -1) && (iRetID != -1))
{
ConfigVariable::removeDynamicLibrary(iRetID);
}