]> git.proxmox.com Git - mirror_qemu.git/commit
usb-mtp: Add some NULL checks for issues pointed out by coverity
authorBandan Das <bsd@redhat.com>
Thu, 3 May 2018 19:20:27 +0000 (15:20 -0400)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 7 May 2018 09:10:25 +0000 (11:10 +0200)
commit24e8d1faea1e4a2dc59841e048390645d7804cb5
tree30e5608632325af87d9dd3ac2d3eb288a3434f7f
parentc8b7e627b4269a3bc3ae41d9f420547a47e6d9b9
usb-mtp: Add some NULL checks for issues pointed out by coverity

CID 1390578: In usb_mtp_write_metadata, parent can never be NULL but
just in case, add an assert
CID 1390592: Check for o->format only if o !=NULL
CID 1390604: Check s->data_out != NULL in usb_mtp_handle_data

Signed-off-by: Bandan Das <bsd@redhat.com>
Message-id: 20180503192028.14353-2-bsd@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-mtp.c