Bug-22109 - Fixed memory leaks and cleanup up the code.
Bug-22111 - Modified journal resume code to properly free malloced data.