kern/163089: Duplicate free in the error return for
mld_v2_encap_report in mld6.c
Herbie Robinson
Herbie.Robinson at stratus.com
Tue Dec 6 03:20:09 UTC 2011
>Number: 163089
>Category: kern
>Synopsis: Duplicate free in the error return for mld_v2_encap_report in mld6.c
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Dec 06 03:20:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Herbie Robinson
>Release: 8
>Organization:
Stratus Technologies
>Environment:
This is a port of the IPv6 code to a non-BSD operating system. I [think] I have checked the latest CVS and the problem is still there.
>Description:
All of this is in src/sys/netinet6/mld6.c
The call code is:
m0 = mld_v2_encap_report(ifp, m);
if (m0 == NULL) {
CTR2(KTR_MLD, "%s: dropped %p", __func__, m);
m_freem(m);
The function mld_v2_encap_report consumes the mbuf in all cases (normal and error return); so, this is duplicate. I haven't been working with the code long enough to know whether the coding philosophy would be to delete the free from the caller or the subroutine. I would be inclined to remove the duplicate free from the caller...
I left the priority as low because memory allocation failures are rare these days...
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list