Free the old config correctly after switching.