dwarf: Fix some coverity issues.