vfio-ccw: Refactor cleanup of regions
commit2a3b9cbaa7b25a4db4cdcfe1c65279c5464f2923
authorEric Farman <farman@linux.ibm.com>
Tue, 5 May 2020 12:57:53 +0000 (5 14:57 +0200)
committerCornelia Huck <cohuck@redhat.com>
Thu, 18 Jun 2020 10:13:54 +0000 (18 12:13 +0200)
tree132b61b6ae64a714a348526c642af6b42d39b06c
parentf76b348ec78fb7316bbcc981127ae8894cfcc609
vfio-ccw: Refactor cleanup of regions

While we're at it, add a g_free() for the async_cmd_region that
is the last thing currently created.  g_free() knows how to handle
NULL pointers, so this makes it easier to remember what cleanups
need to be performed when new regions are added.

Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20200505125757.98209-3-farman@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
hw/vfio/ccw.c