Free sessionid in clean_work and remove redundant setting of strings to NULL since the whole work struct is zeroed.