On Wed, 16 Dec 2020 at 04:12, Niel Fourie <[email protected]> wrote:
>
> Remove setting slave->dev to NULL after the device_remove() call.
>
> The slave pointer points to dev->parent_priv, which has already
> been freed by device_free(), called from device_remove() in the
> preceding line. Writing to slave->dev may cause corruption of the
> dlmalloc free chunk forward pointer of the previously freed chunk.
>
> Signed-off-by: Niel Fourie <[email protected]>
> Cc: Simon Glass <[email protected]>
> ---
>  drivers/spi/spi-uclass.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Simon Glass <[email protected]>

Applied to u-boot-dm/next, thanks!

Reply via email to