summary refs log tree commit diff stats
path: root/hw/core/generic-loader.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2017-02-07 21:27:22 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2017-05-10 10:19:23 +0300
commit1d29b5b0499c4d1f0415fadf94e41ed8964a7ed3 (patch)
tree8223092376446419c42d1b647575d5e9fa6183d8 /hw/core/generic-loader.c
parent3ba34a70223a78e89094c7f0a2f7cb6a667b8f9e (diff)
downloadfocaccia-qemu-1d29b5b0499c4d1f0415fadf94e41ed8964a7ed3.tar.gz
focaccia-qemu-1d29b5b0499c4d1f0415fadf94e41ed8964a7ed3.zip
virtio-blk: Remove useless condition around g_free()
Laszlo spotted and studied this wasteful "if". He pointed out:

The original virtio_blk_free_request needed an "if" as it accesses one
field, since 671ec3f05655 ("virtio-blk: Convert VirtIOBlockReq.elem to
pointer", 2014-06-11); later on in f897bf751fbd ("virtio-blk: embed
VirtQueueElement in VirtIOBlockReq", 2014-07-09) the field became
embedded, so the "if" became unnecessary (at which point we were using
g_slice_free(), but it is the same.

Now drop it.

Reported-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/core/generic-loader.c')
0 files changed, 0 insertions, 0 deletions