This was brought in by a backport since in later versions xalloc/xfree have been replaced by malloc/free.