knn_cuda icon indicating copy to clipboard operation
knn_cuda copied to clipboard

free called on memory allocated by new

Open rcrandall opened this issue 6 years ago • 0 comments

https://github.com/chrischoy/knn_cuda/blob/154e2f706cf5588c3462189a13ffeff14c8a88ba/src/knn.cpp#L56

Calling free on memory allocated by new results in undefined behavior, this is not safe. This should be replaced with delete[] activation; and similarly for the other locations where free is called.

rcrandall avatar Apr 15 '18 03:04 rcrandall