Fix a build error - we can't free a const pointer.