mirror of
https://github.com/pgvector/pgvector.git
synced 2026-12-06 09:18:52 +00:00
Fixed pointer reset if no entry point
This commit is contained in:
1 parent
fa46432417
commit
58f3bb528d
1 file changed
+5
-2
+5
-2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user