diff --git a/modules/vector-sets/hnsw.c b/modules/vector-sets/hnsw.c index cae43e305..9895522f8 100644 --- a/modules/vector-sets/hnsw.c +++ b/modules/vector-sets/hnsw.c @@ -2489,6 +2489,7 @@ void hnsw_cursor_free(hnswCursor *cursor) { hfree(cursor); break; } + prev = x; x = x->next; } pthread_rwlock_unlock(&cursor->index->global_lock);