From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: fbdev: radeon: fix potential memory leak in radeonfb_pci_register() Date: Sat, 16 May 2026 11:10:40 +1000 Message-ID: In-Reply-To: <20260514-fbdev-v1-4-b3a2474fa720@cse.iitm.ac.in> References: <20260514-fbdev-v1-0-b3a2474fa720@cse.iitm.ac.in> <20260514-fbdev-v1-4-b3a2474fa720@cse.iitm.ac.in> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Status: Needs revision =E2=80=94 placement is correct but incomplete** The patch adds `fb_destroy_modelist()` between `err_unmap_fb` and `err_unma= p_rom`: ```c err_unmap_fb: iounmap(rinfo->fb_base); + fb_destroy_modelist(&info->modelist); err_unmap_rom: ``` I verified in the source tree that `radeon_check_modes()` (which populates = the modelist via `fb_add_videomode()`) is called at line 2425, and the only= `goto err_unmap_rom` is at line 2373 (before the modelist is populated), w= hile the only `goto err_unmap_fb` is at line 2460 (after). So the placement= between the two labels is correct =E2=80=94 jumps to `err_unmap_rom` bypas= s the cleanup (modelist not yet populated), while jumps to `err_unmap_fb` f= all through it. However, the **normal remove path** (`radeonfb_pci_unregister()`) should al= so be checked. If it doesn't call `fb_destroy_modelist()`, that's a separat= e leak on module unload. The Fixes tag citing `1da177e4c3f4 ("Linux-2.6.12-rc2")` is technically cor= rect but a bit odd =E2=80=94 this is the initial Linux git import. A more p= recise Fixes tag would reference the commit that added the `fb_add_videomod= e()` call in `radeon_check_modes()`. --- --- Generated by Claude Code Patch Reviewer