diff options
| author | Laurent Vivier <lvivier@redhat.com> | 2025-07-17 17:08:04 +0200 |
|---|---|---|
| committer | Jason Wang <jasowang@redhat.com> | 2025-07-21 10:23:03 +0800 |
| commit | 667ad57b7636881eb79b0b319951f3cba9bbf27e (patch) | |
| tree | 73841077df98897ba7ec9fb81b52c640191b17d6 /net/passt.c | |
| parent | f74e4f2e60c3b2c6e2f13eb115478df116148fe6 (diff) | |
| download | focaccia-qemu-667ad57b7636881eb79b0b319951f3cba9bbf27e.tar.gz focaccia-qemu-667ad57b7636881eb79b0b319951f3cba9bbf27e.zip | |
net/passt: Initialize "error" variable in net_passt_send() (CID 1612368)
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> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net/passt.c')
| -rw-r--r-- | net/passt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/passt.c b/net/passt.c index 43c336e596..32ecffb763 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); |