HomeFreeBSD

Don't leak olinep if malloc() fails.

Description

Don't leak olinep if malloc() fails.

If malloc() fails to allocate linep, then free olinep (if it exists)
before returning to avoid a memory leak.

Reported by: Coverity
CID: 1016716
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6755

Details

Provenance
truckmanAuthored on
Reviewer
kib
Differential Revision
D6755: Don't leak olinep if malloc() fails
Parents
rS301595: Whitespace fix.
Branches
Unknown
Tags
Unknown