Memory leak - can you spot it? source code included ;)

Hey guys, I’ve got this memory leak - I wonder why.

if (!h_img) {

		free(h_img);

	}

Source: CUDA SDK 2.3 - recursiveGaussian.cpp

Oops.

Christian

:D

BTW, for future reference, free(0) is perfectly legal (it’s a NOP), there’s no need for this kind of checks (even without the typo).

Not fixed in the 3.0 version of the SDK.

FAIL. :teehee:

Fixed, thanks!