GDTR remove() fix

This commit is contained in:
Pavel Kirienko 2014-02-28 12:33:05 +04:00
parent eb573ce04e
commit 03cf4aa901

View File

@ -47,12 +47,13 @@ GlobalDataTypeRegistry::RegistResult GlobalDataTypeRegistry::remove(Entry* dtd)
if (!list)
return RegistResultInvalidParams;
Entry* p = list->get();
list->remove(dtd); // If this call came from regist<>(), that would be enough
Entry* p = list->get(); // But anyway
while (p)
{
Entry* const next = p->getNextListNode();
if (p->descriptor.match(dtd->descriptor.getKind(), dtd->descriptor.getName()))
list->remove(dtd);
list->remove(p);
p = next;
}
return RegistResultOk;