[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] aspeed/hace: Initialize g_autofree pointer
From: |
Alex Bennée |
Subject: |
Re: [PATCH] aspeed/hace: Initialize g_autofree pointer |
Date: |
Fri, 21 Apr 2023 14:28:29 +0100 |
User-agent: |
mu4e 1.11.2; emacs 29.0.90 |
Cédric Le Goater <clg@kaod.org> writes:
> As mentioned in docs/devel/style.rst "Automatic memory deallocation":
>
> * Variables declared with g_auto* MUST always be initialized,
> otherwise the cleanup function will use uninitialized stack memory
>
> This avoids QEMU to coredump when running the "hash test" command
> under Zephyr.
>
> Cc: Steven Lee <steven_lee@aspeedtech.com>
> Cc: Joel Stanley <joel@jms.id.au>
> Fixes: c5475b3f9a ("hw: Model ASPEED's Hash and Crypto Engine")
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro