Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: can: zephyr: Prevent potential null pointer dereference
Rearranged the assignment of the interface name to occur after the null check on the device pointer. Although `device->name` wasn't necessarily accessed before the null check, it could have been in certain scenarios, which posed a risk of null pointer dereference. The check is now performed first to ensure safe access. Signed-off-by: Gaetan Perrot <[email protected]>
- Loading branch information