#557046 cppcheck: false negative resource leak on exit()

Package:
cppcheck
Source:
cppcheck
Description:
tool for static C/C++ code analysis (CLI)
Submitter:
Raphael Geissert
Date:
2015-12-29 00:33:04 UTC
Severity:
wishlist
#557046#3
Date:
2009-11-19 07:13:05 UTC
From:
To:
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,

#557046#10
Date:
2009-11-20 22:10:32 UTC
From:
To:
Hi,

Thanks for report!

The leak with exit() is disabled by design. But we could use a command
line option to enable it. Reported to upstream:
http://sourceforge.net/apps/trac/cppcheck/ticket/992