HomeFreeBSD

Fix mbuf leaks in various pru_send implementations

Description

Fix mbuf leaks in various pru_send implementations

The various protocol implementations are not very consistent about
freeing mbufs in error paths. In general, all protocols must free both
"m" and "control" upon an error, except if PRUS_NOTREADY is specified
(this is only implemented by TCP and unix(4) and requires further work
not handled in this diff), in which case "control" still must be freed.

This diff plugs various leaks in the pru_send implementations.

Reviewed by: tuexen
Sponsored by: The FreeBSD Foundation

(cherry picked from commit d8acd2681bcfb2ff7eb154df82f268b1cb191b4c)

Details

Provenance
markjAuthored on May 12 2021, 1:39 PM
Parents
rGb14db362bbd2: dummynet: Fix mbuf tag allocation failure handling
Branches
Unknown
Tags
Unknown