dwarf: fix valgrind warnings