knn_cuda
knn_cuda copied to clipboard
free called on memory allocated by new
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.