[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 050/108] virtio-scsi: Plug memory leak on virtio_sc
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 050/108] virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path |
Date: |
Wed, 6 Aug 2014 15:39:00 -0500 |
From: Markus Armbruster <address@hidden>
Spotted by Coverity.
Signed-off-by: Markus Armbruster <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 91e7fcca4743cf694eb0c8e7a8d938cf359b5bd8)
Signed-off-by: Michael Roth <address@hidden>
---
hw/scsi/virtio-scsi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 1752193..14261fb 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -498,7 +498,7 @@ static void virtio_scsi_push_event(VirtIOSCSI *s,
SCSIDevice *dev,
uint32_t event, uint32_t reason)
{
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
- VirtIOSCSIReq *req = virtio_scsi_pop_req(s, vs->event_vq);
+ VirtIOSCSIReq *req;
VirtIOSCSIEvent *evt;
VirtIODevice *vdev = VIRTIO_DEVICE(s);
int in_size;
@@ -507,6 +507,7 @@ static void virtio_scsi_push_event(VirtIOSCSI *s,
SCSIDevice *dev,
return;
}
+ req = virtio_scsi_pop_req(s, vs->event_vq);
if (!req) {
s->events_dropped = true;
return;
--
1.9.1
- [Qemu-stable] [PATCH 043/108] pci-assign: limit # of msix vectors, (continued)
- [Qemu-stable] [PATCH 043/108] pci-assign: limit # of msix vectors, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 040/108] spapr_pci: Fix number of returned vectors in ibm, change-msi, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 044/108] virtio: allow mapping up to max queue size, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 045/108] qcow1: Make padding in the header explicit, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 047/108] qcow1: Validate L2 table size (CVE-2014-0222), Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 046/108] qcow1: Check maximum cluster size, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 049/108] qcow1: Stricter backing file length check, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 048/108] qcow1: Validate image size (CVE-2014-0223), Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 051/108] target-xtensa: fix cross-page jumps/calls at the end of TB, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 052/108] cputlb: Fix regression with TCG interpreter (bug 1310324), Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 050/108] virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path,
Michael Roth <=
- [Qemu-stable] [PATCH 053/108] input (curses): mask keycodes to remove modifier bits, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 055/108] block/sheepdog: Plug memory leak in sd_snapshot_create(), Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 054/108] qemu-img: Plug memory leak in convert command, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 056/108] block/vvfat: Plug memory leak in read_directory(), Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 057/108] block/vvfat: Plug memory leak in check_directory_consistency(), Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 059/108] blockdev: Plug memory leak in drive_init(), Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 060/108] blockdev: Plug memory leak in blockdev_init(), Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 062/108] block: Plug memory leak on brv_open_image() error path, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 058/108] block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 063/108] qcow2: Plug memory leak on qcow2_invalidate_cache() error paths, Michael Roth, 2014/08/06