um: virtio_uml: free command if adding to virtqueue failed
authorBenjamin Berg <benjamin.berg@intel.com>
Thu, 9 Feb 2023 09:00:02 +0000 (10:00 +0100)
committerRichard Weinberger <richard@nod.at>
Mon, 13 Feb 2023 09:14:32 +0000 (10:14 +0100)
commit8a6ca543646f2940832665dbf4e04105262505e2
tree9a09cf12984a511a2fdd10bdee9395300c2bf447
parentb99ddbe8336ee680257c8ab479f75051eaa49dcf
um: virtio_uml: free command if adding to virtqueue failed

If adding the command fails (i.e. the virtqueue is broken) then free it
again if the function allocated a new buffer for it.

Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/virt-pci.c