Fix const free warnings