HomeFreeBSD

in_pcb: don't leak credential refcounts on error

Description

in_pcb: don't leak credential refcounts on error

In the error path during allocating an in_pcb, the credentials
associated with the new struct get their reference count
increased early on, but not decremented when the allocation
fails.

Reported by: cmiller_netapp.com
MFC after: 3 days
Reviewed by: jhb, tuexen
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D45033

(cherry picked from commit 30cf0fbf26243f23631739f406959ce5aaba9f5c)

Details

Provenance
rscheffAuthored on Wed, May 1, 6:40 AM
Reviewer
jhb
Differential Revision
D45033: in_pcb: don't leak credential refcounts on error
Parents
rG7de39f926cd0: vmm.4: Add verbiage about need to load module from loader.conf
Branches
Unknown
Tags
Unknown