fix malloc bugs in process_list_pop