mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-11 15:16:54 +08:00
Fixed issue with freeing
This commit is contained in:
@@ -207,9 +207,6 @@ hnswgettuple(IndexScanDesc scan, ScanDirection dir)
|
|||||||
Datum value = PointerGetDatum(hc->element->vec);
|
Datum value = PointerGetDatum(hc->element->vec);
|
||||||
bool isnull = false;
|
bool isnull = false;
|
||||||
|
|
||||||
if (scan->xs_itup)
|
|
||||||
pfree(scan->xs_itup);
|
|
||||||
|
|
||||||
scan->xs_itup = index_form_tuple(scan->xs_itupdesc, &value, &isnull);
|
scan->xs_itup = index_form_tuple(scan->xs_itupdesc, &value, &isnull);
|
||||||
scan->xs_itup->t_tid = *heaptid;
|
scan->xs_itup->t_tid = *heaptid;
|
||||||
}
|
}
|
||||||
@@ -242,7 +239,4 @@ hnswendscan(IndexScanDesc scan)
|
|||||||
|
|
||||||
pfree(so);
|
pfree(so);
|
||||||
scan->opaque = NULL;
|
scan->opaque = NULL;
|
||||||
|
|
||||||
if (scan->xs_itup)
|
|
||||||
pfree(scan->xs_itup);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user