HomeFreeBSD

Fix misc Coverity defects in camdd(8)

Description

Fix misc Coverity defects in camdd(8)

CID 1341620 Fix a small memory leak
CID 1341630 Though this is technically a false positive, rearrange the

		code for clarity.

CID 1341635 Eliminate dead code
CID 1368663 Fix a double mutex unlock in the error path

Also:

  • Use sig_atomic_t for variables accessed from signal handlers
  • Don't conditionalize free(3) on its argument being non-null

Reported by: Coverity
CID: 1341620 1341630 1341635 1368663
Reviewed by: ken
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9237

Details

Provenance
asomersAuthored on
Reviewer
ken
Differential Revision
D9237: Fix misc Coverity defects in camdd(8)
Parents
rS312558: Misc Coverity fixes in camcontrol(8)
Branches
Unknown
Tags
Unknown