Page MenuHomeFreeBSD

Memory leaks in eui64_line()
ClosedPublic

Authored by pfg on Feb 27 2015, 2:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 9 2024, 6:20 AM
Unknown Object (File)
Dec 20 2023, 7:06 AM
Unknown Object (File)
Dec 13 2023, 3:59 AM
Unknown Object (File)
Nov 30 2023, 7:01 AM
Unknown Object (File)
Jul 3 2023, 4:58 PM
Unknown Object (File)
May 11 2023, 4:20 AM
Unknown Object (File)
Sep 10 2016, 4:52 AM
Unknown Object (File)
Sep 9 2016, 12:01 AM
Subscribers
None

Details

Reviewers
brooks
delphij
Summary

According to Coverity, there are memory leaks for cur and linehead.

The "bad" label would indicate that effectively linehead seems to need
freeing. It doesn't seem to hurt to free "cur" also.

Test Plan

IPV6

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

pfg retitled this revision from to Memory leaks in eui64_line() According to Coverity, there are memory leaks for cur and linehead. The "bad" label would indicate that effectively linehead seems to need freeing. It doesn't seem to hurt to free "cur" also..
pfg updated this object.
pfg edited the test plan for this revision. (Show Details)
pfg added a reviewer: delphij.
delphij requested changes to this revision.Feb 27 2015, 2:29 AM
delphij edited edge metadata.

The proposed patch is wrong. 'cur' is never leaked because it's not a new allocation.

lib/libc/net/eui64.c
135

This is WRONG. cur should not be freed because it's part of line[head].

This revision now requires changes to proceed.Feb 27 2015, 2:29 AM
pfg edited edge metadata.
pfg retitled this revision from Memory leaks in eui64_line() According to Coverity, there are memory leaks for cur and linehead. The "bad" label would indicate that effectively linehead seems to need freeing. It doesn't seem to hurt to free "cur" also. to Memory leaks in eui64_line().
pfg updated this object.

Makes sense: the normal return free() matches the bad label now.

Thanks!

delphij edited edge metadata.
This revision is now accepted and ready to land.Feb 27 2015, 3:14 AM
brooks edited edge metadata.

Looks good to me.

Thank you for reviewing!

Committed as revision 279363.