diff --git a/src/hnswscan.c b/src/hnswscan.c index 88edf3b..2874468 100644 --- a/src/hnswscan.c +++ b/src/hnswscan.c @@ -225,8 +225,13 @@ hnswgettuple(IndexScanDesc scan, ScanDirection dir) if (element->heaptidsLength == 0) { so->w = list_delete_last(so->w); - pfree(element); - pfree(hc); + + if (hnsw_streaming) + { + pfree(element); + pfree(hc); + } + continue; }