This changeset fixes various memory leaks and dead assignments found by
clang static analyzer.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 252 Build 252: arc lint + arc unit
Event Timeline
Comment Actions
The ctladm(8) utility uses getopt in a rather creative way, IIRC. Are you sure the "optarg" changes are ok? (I'm not suggesting they are not, just trying to make sure.)
usr.sbin/ctladm/ctladm.c | ||
---|---|---|
412 | Hm, shouldn't we instead leave assigning the retval and "return (retval)" here? | |
1122 | Shouldn't this be "strtoul(token, ...)" instead? I mean, you replaced "tmpstr2" with "token", not "string". | |
2942 | Move the declaration up too, perhaps? | |
3085 | Hm, perhaps you could move this out to a helper function, instead of duplicating the code here and above? |
Comment Actions
Ping? For the most part the patch is good, could we perhaps move this forward? Alternatively I can try and pick it up, if you wish.