vfio/type1: Fix leak on error path
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 1 Jul 2013 14:28:58 +0000 (08:28 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 1 Jul 2013 14:28:58 +0000 (08:28 -0600)
commit8d38ef1948bd415a5cb653a5c0ec16f3402aaca1
treea28c39a7e8f7b4855a4ff867051fd90297aad670
parent6d6768c61b39a2184bc11bb0342e4f7f35642bcc
vfio/type1: Fix leak on error path

We also don't handle unpinning zero pages as an error on other exits
so we can fix that inconsistency by rolling in the next conditional
return.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio_iommu_type1.c