From 1f571da4f55ed33abfdf9daff06f21af8a29ed6d Mon Sep 17 00:00:00 2001 From: Alec Woods Date: Sun, 1 Nov 2020 11:15:12 -0500 Subject: [PATCH] Avoid double free in cannyEdgeDetectorNPP.cpp The device memory for the image will be automatically freed when the image object itself is destroyed. --- Samples/cannyEdgeDetectorNPP/cannyEdgeDetectorNPP.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Samples/cannyEdgeDetectorNPP/cannyEdgeDetectorNPP.cpp b/Samples/cannyEdgeDetectorNPP/cannyEdgeDetectorNPP.cpp index 496d53b3..97932ad3 100644 --- a/Samples/cannyEdgeDetectorNPP/cannyEdgeDetectorNPP.cpp +++ b/Samples/cannyEdgeDetectorNPP/cannyEdgeDetectorNPP.cpp @@ -208,9 +208,6 @@ int main(int argc, char *argv[]) { saveImage(sResultFilename, oHostDst); std::cout << "Saved image: " << sResultFilename << std::endl; - nppiFree(oDeviceSrc.data()); - nppiFree(oDeviceDst.data()); - exit(EXIT_SUCCESS); } catch (npp::Exception &rException) { std::cerr << "Program error! The following exception occurred: \n";