HomeFreeBSD

fts: Fix a potential memory leak in error case

Description

fts: Fix a potential memory leak in error case

Dan Krejsa reports a potential memory leak in an fts_build error case,
detected by Coverity. (It doesn't seem to show up in Coverity Scan, so I
don't have a CID to point to.)

I don't know whether it is actually possible to arrive in this case with a
non-empty 'head' list. The cost is low, though. One additional branch in a
terminal error case isn't the end of the world.

PR: 217125
Submitted by: Dan Krejsa <dan.krejsa at gmail.com>

Details

Provenance
cemAuthored on
Parents
rS314676: Fix build after r314656
Branches
Unknown
Tags
Unknown