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