From 72aa53ef5418c256c61af2c4091506a620bf3960 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sat, 21 Sep 2024 16:15:00 -0700 Subject: [PATCH] Only free if streaming [skip ci] --- src/hnswscan.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; }