d039b0700b
Just calling gnttab_end_foreign_access_ref doesn't free the references, instead call gnttab_end_foreign_access with a NULL page argument in order to have the grant references freed. The code that maps the ring (xenbus_map_ring) already uses gnttab_grant_foreign_access which takes care of allocating a grant reference. Reviewed by: Wei Liu <wei.liu2@citrix.com> Sponsored by: Citrix Systems R&D Differential revision: https://reviews.freebsd.org/D6608