Package: cppcheck Version: 1.38-1 Severity: wishlist Hi,
Attached test case demonstrates a possible fd leak whenever exit(3) is called. cppcheck correctly detects the leakage when 'return' is used instead. Would be great if cppcheck could handle exit(3) as well. Cheers, -- Raphael Geissert - Debian Developer www.debian.org - get.debian.net
void t(void) { FILE *a,*b; if ((a = fopen("/dev/null", "r")) == NULL) exit(EXIT_FAILURE); if ((b = fopen("/dev/null", "r")) == NULL) exit(EXIT_FAILURE); fclose(a); fclose(b); }