vfio: ccw: set ccw->cda to NULL defensively
authorDong Jia Shi <bjsdjshi@linux.ibm.com>
Wed, 23 May 2018 02:56:44 +0000 (04:56 +0200)
committerCornelia Huck <cohuck@redhat.com>
Tue, 29 May 2018 07:27:42 +0000 (09:27 +0200)
commit6238f92132a6da64b731de1a728fa46ffaa21f62
tree45465435d773ecf4a24a3f8ad240745da880b6ce
parent5c1cfb1c3948fe93a32dfcd75223dda0f1558bb7
vfio: ccw: set ccw->cda to NULL defensively

Let's avoid free on ccw->cda that points to a guest address
or an already freed memory area by setting it to NULL if memory
allocation didn't happen or failed.

Signed-off-by: Dong Jia Shi <bjsdjshi@linux.ibm.com>
Message-Id: <20180523025645.8978-4-bjsdjshi@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
drivers/s390/cio/vfio_ccw_cp.c