usb-mtp: fix some usb_mtp_write_data return paths
commit298ac63c4428e05b09f9d0959f89fd5436c4a0ec
authorBandan Das <bsd@redhat.com>
Wed, 6 Mar 2019 21:04:08 +0000 (6 16:04 -0500)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 7 Mar 2019 09:02:48 +0000 (7 10:02 +0100)
tree10411d58b69038afd15a577f6f03369936776e75
parentc5ead51f90cf33ccf07974eba5154be2af2c7fc3
usb-mtp: fix some usb_mtp_write_data return paths

During a write, free up the "path" before getting more data.
Also, while we at it, remove the confusing usage of d->fd for
storing mkdir status

Spotted by Coverity: CID 1398642

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