block/nvme: fix Coverity reports
commit78d8c99e297eba32897d8a5bdaa005670549d6f7
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 13 Feb 2018 01:52:40 +0000 (13 09:52 +0800)
committerFam Zheng <famz@redhat.com>
Thu, 1 Mar 2018 07:21:46 +0000 (1 15:21 +0800)
tree2bc121978f94a0e4608000cf5f857ec26703b64d
parent6697439794f72b3501ee16bb95d16854f9981421
block/nvme: fix Coverity reports

1) string not null terminated in sysfs_find_group_file

2) NULL pointer dereference and dead local variable in nvme_init.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20180213015240.9352-1-famz@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
block/nvme.c
util/vfio-helpers.c