> In nouveau_debugfs_init(), if nvif_object_ctor() fails, the previously
> allocated drm->debugfs is leaked because the function returns the
> error code directly.
>
> Fix this by freeing the allocated memory and clearing the pointer on
> the error path.
>
> Fixes: b126a200e9db ("drm/nouveau/debugfs: we need a ctrl object for debugfs")
> Cc: [email protected]
> Reviewed-by: Lyude Paul <[email protected]>
> Signed-off-by: liupeng <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review ยท
https://sashiko.dev/#/patchset/[email protected]?part=1