HomeFreeBSD

seekdir_basic: fix various Coverity issues

Description

seekdir_basic: fix various Coverity issues

Address..

  • .. resource leaks of file descriptors and memory
  • .. unchecked return values from creat(2), mkdir(2), and telldir(3)
  • .. potential NULL derefs after calling readdir(3)

MFC after: 1 week
Reported by: Coverity
CID: 975255, 975256, 976989, 978989, 978990

Details

Provenance
ngieAuthored on
Parents
rS311226: mtx: plug open-coded mtx_lock access missed in r311172
Branches
Unknown
Tags
Unknown