Page MenuHomeFreeBSD

Fix various memory related problems
Needs ReviewPublic

Authored by delphij on Aug 27 2015, 7:38 AM.

Details

Reviewers
trasz
mav
Summary

This changeset fixes various memory leaks and dead assignments found by
clang static analyzer.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 252
Build 252: arc lint + arc unit

Event Timeline

delphij retitled this revision from to Fix various memory related problems.
delphij updated this object.
delphij edited the test plan for this revision. (Show Details)
delphij added reviewers: mav, trasz.

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?

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.

What's the status on this? Do you still intend to commit it?