Fixed pointer reset if no entry point

This commit is contained in:
Andrew Kane committed 2026-12-04 04:53:52 -08:00
1 parent fa46432417
commit 58f3bb528d
1 file changed
+5 -2
+5 -2
View File
@@ -272,8 +272,11 @@ RepairGraphElement(HnswVacuumState * vacuumstate, HnswElement element, HnswEleme
/* Reset pointers for safety */
HnswPtrStore(base, element->neighbors, (HnswNeighborArrayPtr *) NULL);
HnswPtrStore(base, element->value, (char *) NULL);
HnswPtrStore(base, entryPoint->neighbors, (HnswNeighborArrayPtr *) NULL);
HnswPtrStore(base, entryPoint->value, (char *) NULL);
if (entryPoint != NULL)
{
HnswPtrStore(base, entryPoint->neighbors, (HnswNeighborArrayPtr *) NULL);
HnswPtrStore(base, entryPoint->value, (char *) NULL);
}
/* Reset memory context */
MemoryContextSwitchTo(oldCtx);