HNSW: calloc() -> hmalloc().

This commit is contained in:
antirez 2025-02-24 23:26:23 +01:00
parent 6e09e05af5
commit 1a2da02db6
1 changed files with 2 additions and 1 deletions

3
hnsw.c
View File

@ -1200,7 +1200,8 @@ void hnsw_reconnect_nodes(HNSW *index, hnswNode **nodes, int count, uint32_t lay
}
// Step 5: Pair nodes greedily based on scores.
int *used = calloc(count, sizeof(int));
int *used = hmalloc(count*sizeof(int));
memset(used,0,count*sizeof(int));
if (!used) {
hfree(distances);
hfree(row_avgs);