To get xattr of given path or fd on newly allocated buffer, add new helper api getxattr_malloc() and fgetxattr_malloc().