Re: [PATCH] drm/nouveau: Fix memory leak in nouveau_channel_ctor()

From: Markus Elfring

Date: Tue Jan 27 2026 - 04:23:15 EST



> Add nouveau_channel_del() to the error path to ensure the allocated
> channel is properly freed.


https://elixir.bootlin.com/linux/v6.19-rc5/source/drivers/gpu/drm/nouveau/nouveau_chan.c#L247-L351

* Would you like to complete the exception handling by using another goto chain?

* How do you think about to increase the application of scope-based resource management?


See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v6.19-rc7#n34

Regards,
Markus