Fix a few more memory errors

Free a string allocated by strndup

No need to add a null byte to a string created by sprintf
Add a bunch of missing frees in dump_t.c