[cfe-dev] Static analyzer: possible memory leak false positive?
Joerg Sonnenberger
joerg at britannica.bec.de
Fri Sep 14 03:22:15 PDT 2012
On Fri, Sep 14, 2012 at 11:15:22AM +0200, Erik Cederstrand wrote:
> Hi all,
>
> Before spamming Bugzilla, I'd like an opinion on this possible false positive in the static analyzer.
>
> See http://scan.freebsd.your.org/freebsd-head/bin.df/2012-09-12-amd64/report-WwB2qk.html#EndPath
>
> The analyzer is complaining about a memory leak of mntbuf two lines before the end of the main() function.
>
> I'm not sure this is actually a false positive since it relies on the implicit behavior that the OS reclaims the memory regardless, but the warning does seem of minor value.
I wouldn't classify it as false positive. E.g. it is perfectly sane to
redefine main as macro to use in a larger program.
Joerg
More information about the cfe-dev
mailing list