From: Peter Maydell <peter.maydell@linaro.org>
To: "Zhang, Chen" <chen.zhang@intel.com>
Cc: Jason Wang <jasowang@redhat.com>,
Li Zhijian <lizhijian@fujitsu.com>,
qemu-dev <qemu-devel@nongnu.org>
Subject: Re: [PATCH] net/colo.c: Fix the pointer issuse reported by Coverity.
Date: Fri, 5 Aug 2022 09:52:40 +0100 [thread overview]
Message-ID: <CAFEAcA-91NQT1ETPqygSF45irYf5Wf6uFWocUp0qZ0Yu0JsGgg@mail.gmail.com> (raw)
In-Reply-To: <MWHPR11MB00313220A2758E74C1098E539B9E9@MWHPR11MB0031.namprd11.prod.outlook.com>
On Fri, 5 Aug 2022 at 06:56, Zhang, Chen <chen.zhang@intel.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Jason Wang <jasowang@redhat.com>
> > I wonder under which case we can see data == NULL?
> >
> > AFAIK, data is either dup via packet_new() or assigned to a pointer to the buf
> > in packet_new_nocopy().
>
> Yes, you are right. I just checked it for hint of bugs.
> Do you think no need to do it?
If you think it is a "should never happen unless QEMU is buggy" case, then
assert(data).
thanks
-- PMM
next prev parent reply other threads:[~2022-08-05 8:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-02 8:09 [PATCH] net/colo.c: Fix the pointer issuse reported by Coverity Zhang Chen
2022-08-05 3:46 ` Jason Wang
2022-08-05 5:56 ` Zhang, Chen
2022-08-05 8:52 ` Peter Maydell [this message]
2022-08-05 9:22 ` Zhang, Chen
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-91NQT1ETPqygSF45irYf5Wf6uFWocUp0qZ0Yu0JsGgg@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=chen.zhang@intel.com \
--cc=jasowang@redhat.com \
--cc=lizhijian@fujitsu.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).