[PATCH] nvme: Fix memory leak on error path of nvme_init

Tom Rini trini at konsulko.com
Fri Jul 11 00:42:09 CEST 2025


On Wed, 02 Jul 2025 17:02:10 +0100, Andrew Goodbody wrote:

> The use of log_msg_ret to log a message and return an error meant that
> memory allocated earlier in the function was not freed on this error
> path. Instead log the message in the same way that log_msg_ret would do
> and then goto the cleanup code to free the memory.
> 
> This issue found by Smatch.
> 
> [...]

Applied to u-boot/master, thanks!

[1/1] nvme: Fix memory leak on error path of nvme_init
      commit: f074616014179eefbca6f4b86b1fa6336711ba80
-- 
Tom




More information about the U-Boot mailing list