HomeFreeBSD

iflib: Fix potential leak in iflib_if_transmit

Description

iflib: Fix potential leak in iflib_if_transmit

Due to an accidental mismatch between allocation and release in the slow path
of iflib_if_transmit, if a caller passed 9-16 mbufs to the routine, the mbuf
array would be leaked.

Fix the mismatch by removing the magic numbers in favor of nitems() on the
stack array. According to mmacy, this leak is unlikely.

Reported by: Coverity
Discussed with: mmacy
CID: 1356040
Sponsored by: EMC / Isilon Storage Division

Details

Provenance
cemAuthored on
Parents
rS301562: Fix a minor leak in ACPI thermal
Branches
Unknown
Tags
Unknown