]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 16 Nov 2012 16:47:00 +0000 (16:47 +0000)
commitde1e9234c8d6aa740d2c8b6df0bca372663481d9
tree07ff9387f17edc79f8f7abfaf16e8185ba7c0ae5
parent5b4478f5dabb7f764e2fce480b47204e06095a73
xen/gntdev: don't leak memory from IOCTL_GNTDEV_MAP_GRANT_REF

commit a67baeb77375199bbd842fa308cb565164dd1f19 upstream.

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>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/xen/gntdev.c