HomeFreeBSD

The value le->name cannot be NULL when we're freeing an entry in the
rS179236Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

The value le->name cannot be NULL when we're freeing an entry in the
hardlink table for two reasons: 1. If le->name is set to NULL, the
structure le won't be inserted into the table; 2. Even if le somehow
did manage to get into the table with le->name equal to NULL, we would
die when we dereferenced le->null before we could get to the point of
freeing the entry.

Remove the unnecessary "if (le->name != NULL)" test and just free the
pointer.

Found by: Coverity Prevent

Details

Provenance
cpercivaAuthored on
Parents
rS179235: Check that lseek(2) succeeds and puts us where we expect. [1]
Branches
Unknown
Tags
Unknown

Event Timeline