Fix a potential null pointer deref & a potential memory leak,
also reformat to conform to the usual lldb coding conventions
a little better.
clang static analyzer fixit.