summary refs log tree commit diff stats
path: root/hw/misc/mst_fpga.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2018-07-12 10:54:20 +0800
committerFam Zheng <famz@redhat.com>2018-08-15 10:12:35 +0800
commit9582f357bb6f6573c9a452743d8f3ab41ba2e3fa (patch)
treed6055671feca217b0f24f9b7503a1db8710d643f /hw/misc/mst_fpga.c
parenta3f9f64bf9182f949af7d7b08f7387c976957eec (diff)
downloadfocaccia-qemu-9582f357bb6f6573c9a452743d8f3ab41ba2e3fa.tar.gz
focaccia-qemu-9582f357bb6f6573c9a452743d8f3ab41ba2e3fa.zip
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 'hw/misc/mst_fpga.c')
0 files changed, 0 insertions, 0 deletions