mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2024-11-28 17:29:18 +08:00
Avoid double free in boxFilterNPP.cpp
The device memory for the image will be automatically freed when the image object itself is destroyed.
This commit is contained in:
parent
c4e2869a2b
commit
d06e135943
|
@ -167,9 +167,6 @@ int main(int argc, char *argv[]) {
|
||||||
saveImage(sResultFilename, oHostDst);
|
saveImage(sResultFilename, oHostDst);
|
||||||
std::cout << "Saved image: " << sResultFilename << std::endl;
|
std::cout << "Saved image: " << sResultFilename << std::endl;
|
||||||
|
|
||||||
nppiFree(oDeviceSrc.data());
|
|
||||||
nppiFree(oDeviceDst.data());
|
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
} catch (npp::Exception &rException) {
|
} catch (npp::Exception &rException) {
|
||||||
std::cerr << "Program error! The following exception occurred: \n";
|
std::cerr << "Program error! The following exception occurred: \n";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user