diff options
author | Fam Zheng <famz@redhat.com> | 2018-07-12 10:54:20 +0800 |
---|---|---|
committer | Fam Zheng <famz@redhat.com> | 2018-08-15 10:12:35 +0800 |
commit | 9582f357bb6f6573c9a452743d8f3ab41ba2e3fa (patch) | |
tree | d6055671feca217b0f24f9b7503a1db8710d643f /include/ui | |
parent | a3f9f64bf9182f949af7d7b08f7387c976957eec (diff) |
nvme: Fix nvme_init error handling
It is wrong to leave this field as 1, as nvme_close() called in the
error handling code in nvme_file_open() will use it and try to free
s->queues again.
Another problem is the cleaning ups are duplicated between the fail*
labels of nvme_init() and nvme_file_open(), which calls nvme_close().
A third problem is nvme_close() misses g_free() and
event_notifier_cleanup().
Fix all of them.
Cc: qemu-stable@nongnu.org
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20180712025420.4932-1-famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'include/ui')
0 files changed, 0 insertions, 0 deletions