[sr-dev] git:master:ab17b681: pdb: convert to memory logging helper, properly free memory in error cases