HomeFreeBSD

cppcheck: (error) Null pointer dereference: who_perm

Description

cppcheck: (error) Null pointer dereference: who_perm

As indicated by the VERIFY the local who_perm variable can never
be NULL in parse_fs_perm(). Due to the existence of the is_set
conditional, which is always true, cppcheck 1.88 was reporting
a possible NULL reference. Resolve the issue by removing the
extraneous is_set variable.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #9732

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Dec 16 2019, 11:49 PM
Parents
rG070402f112bc: cppcheck: (warning) Possible null pointer dereference: dnp
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG1e49b288cbb2: cppcheck: (error) Null pointer dereference: who_perm (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Dec 19 2019, 1:25 AM