setup: free old value before setting `work_tree`