ExtendedTools: Fix string references
@@ -835,7 +835,7 @@ VOID PhpQueryHostnameForEntry(
while (PhEnumHashtable(EtFwResolveCacheHashtable, (PVOID*)&entry, &i))
{
if ((*entry)->HostString)
- PhReferenceObject((*entry)->HostString);
+ PhDereferenceObject((*entry)->HostString);
PhFree(*entry);
}
@@ -1092,9 +1092,9 @@ BOOLEAN EtFwGetFilterDisplayData(
while (PhEnumHashtable(EtFwFilterDisplayDataHashTable, (PVOID*)&enumEntry, &i))
{
if ((*enumEntry).Name)
- PhReferenceObject((*enumEntry).Name);
+ PhDereferenceObject((*enumEntry).Name);
if ((*enumEntry).Description)
- PhReferenceObject((*enumEntry).Description);
+ PhDereferenceObject((*enumEntry).Description);
}
PhDereferenceObject(EtFwFilterDisplayDataHashTable);
@@ -1228,7 +1228,9 @@ VOID EtFwFlushSidFullNameCache(
while (entry = PhNextEnumHashtable(&enumContext))
{
+ if (entry->Sid)
PhFree(entry->Sid);
+ if (entry->FullName)
PhDereferenceObject(entry->FullName);
}
