fix xfree() so it can be re-written as a macro