]> git.proxmox.com Git - mirror_qemu.git/commit
usb-mtp: fix segmentation fault
authorGonglei <arei.gonglei@huawei.com>
Wed, 6 May 2015 12:55:29 +0000 (20:55 +0800)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 8 May 2015 11:01:07 +0000 (13:01 +0200)
commite60baebd409d547292c778d599111ea1623dd4b5
treee6d3d392e929dbf2593a7382596277718652c7a0
parent7c03a899e6e4030a88bd42c4d494e3a7521806ea
usb-mtp: fix segmentation fault

When x-root property not be configured, will cause segfault
because of null pointer accessing. Add a check for s->root
property avoid segfault.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-mtp.c