xen/gntdev: don't leak memory from IOCTL_GNTDEV_MAP_GRANT_REF
authorDavid Vrabel <david.vrabel@citrix.com>
Wed, 24 Oct 2012 11:39:02 +0000 (12:39 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 30 Oct 2012 13:27:32 +0000 (09:27 -0400)
commita67baeb77375199bbd842fa308cb565164dd1f19
tree7d0741784e172ba665dbef4dd7418150fdb2ab2f
parentb6514633bdc6a511f7c44b3ecb86d6071374239d
xen/gntdev: don't leak memory from IOCTL_GNTDEV_MAP_GRANT_REF

map->kmap_ops allocated in gntdev_alloc_map() wasn't freed by
gntdev_put_map().

Add a gntdev_free_map() helper function to free everything allocated
by gntdev_alloc_map().

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Cc: stable@vger.kernel.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/gntdev.c