From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path
Date: Fri, 16 May 2014 17:52:45 +0200 [thread overview]
Message-ID: <5376344D.5080002@redhat.com> (raw)
In-Reply-To: <1400255046-24481-3-git-send-email-armbru@redhat.com>
Il 16/05/2014 17:44, Markus Armbruster ha scritto:
> Spotted by Coverity.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> 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;
>
Cc: qemu-stable@nongnu.org
next prev parent reply other threads:[~2014-05-16 15:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 15:44 [Qemu-devel] [PATCH 0/2] Two simple Coverity defect patches Markus Armbruster
2014-05-16 15:44 ` [Qemu-devel] [PATCH 1/2] scsi: Document intentional fall through in scsi_req_length() Markus Armbruster
2014-05-16 15:44 ` [Qemu-devel] [PATCH 2/2] virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path Markus Armbruster
2014-05-16 15:52 ` Paolo Bonzini [this message]
2014-05-16 15:53 ` [Qemu-devel] [PATCH 0/2] Two simple Coverity defect patches Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5376344D.5080002@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.