Skip to content

Commit b0425ef

Browse files
committed
Memory leax fix (thanks Christos Stamatopoulos).
1 parent 6207a68 commit b0425ef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cpp/flann/algorithms/nn_index.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ class NNIndex : public IndexBase
375375
indices[i][j] = indices_[i][j];
376376
}
377377
}
378+
delete[] indices_.ptr();
378379
return result;
379380
}
380381

@@ -580,6 +581,7 @@ class NNIndex : public IndexBase
580581
indices[i][j] = indices_[i][j];
581582
}
582583
}
584+
delete[] indices_.ptr();
583585
return result;
584586
}
585587

0 commit comments

Comments
 (0)