From: Peter Maydell <peter.maydell@linaro.org>
To: Laurent Vivier <lvivier@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>
Subject: Re: [PATCH 5/6] net/passt: Initialize "error" variable in net_passt_send() (CID 1612368)
Date: Sat, 19 Jul 2025 20:53:43 +0100 [thread overview]
Message-ID: <CAFEAcA_XHBgGRXOU+SByLEC5DTUuoqLcOiuGs7pSoGk2JSwyuQ@mail.gmail.com> (raw)
In-Reply-To: <20250717150805.1344034-6-lvivier@redhat.com>
On Thu, 17 Jul 2025 at 18:51, Laurent Vivier <lvivier@redhat.com> wrote:
>
> This was flagged by Coverity as a memory illegal access.
>
> Initialize the pointer to NULL at declaration.
>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
> net/passt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/passt.c b/net/passt.c
> index 43c336e5968c..32ecffb763b4 100644
> --- a/net/passt.c
> +++ b/net/passt.c
> @@ -124,7 +124,7 @@ static gboolean net_passt_send(QIOChannel *ioc, GIOCondition condition,
> {
> if (net_stream_data_send(ioc, condition, data) == G_SOURCE_REMOVE) {
> NetPasstState *s = DO_UPCAST(NetPasstState, data, data);
> - Error *error;
> + Error *error = NULL;
>
> /* we need to restart passt */
> kill(s->pid, SIGTERM);
> --
> 2.49.0
>
>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
next prev parent reply other threads:[~2025-07-19 20:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 15:07 [PATCH 0/6] net: Fix various Coverity issues in vhost-user and passt Laurent Vivier
2025-07-17 15:08 ` [PATCH 1/6] net/passt: Remove unused "err" from passt_vhost_user_event() (CID 1612375) Laurent Vivier
2025-07-19 19:52 ` Peter Maydell
2025-07-17 15:08 ` [PATCH 2/6] net/vhost-user: Remove unused "err" from net_vhost_user_event() (CID 1612372) Laurent Vivier
2025-07-19 19:53 ` Peter Maydell
2025-07-17 15:08 ` [PATCH 3/6] net/passt: Remove dead code in passt_vhost_user_start error path (CID 1612371) Laurent Vivier
2025-07-19 19:53 ` Peter Maydell
2025-07-17 15:08 ` [PATCH 4/6] net/passt: Check return value of g_remove() in net_passt_cleanup() (CID 1612369) Laurent Vivier
2025-07-19 19:52 ` Peter Maydell
2025-07-17 15:08 ` [PATCH 5/6] net/passt: Initialize "error" variable in net_passt_send() (CID 1612368) Laurent Vivier
2025-07-19 19:53 ` Peter Maydell [this message]
2025-07-17 15:08 ` [PATCH 6/6] net/vhost-user: Remove unused "err" from chr_closed_bh() (CID 1612365) Laurent Vivier
2025-07-19 19:53 ` Peter Maydell
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=CAFEAcA_XHBgGRXOU+SByLEC5DTUuoqLcOiuGs7pSoGk2JSwyuQ@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=jasowang@redhat.com \
--cc=lvivier@redhat.com \
--cc=mst@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).