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