A use-after-free vulnerability in the Linux kernel's media remote control (rc) subsystem was fixed by ensuring the 'registered' flag is cleared on error paths. If rc_register_device() fails but lirc_register() succeeds, userspace could hold an open file descriptor leading to use-after-free conditions. Proper locking and state management prevent polling errors and potential resource misuse.