Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mac80211_hwsim: Fix possible null-pointer dereferences in hwsim_dump_…
…radio_nl() In hwsim_dump_radio_nl(), when genlmsg_put() on line 3617 fails, hdr is assigned to NULL. Then hdr is used on lines 3622 and 3623: genl_dump_check_consistent(cb, hdr); genlmsg_end(skb, hdr); Thus, possible null-pointer dereferences may occur. To fix these bugs, hdr is used here when it is not NULL. This bug is found by a static analysis tool STCheck written by us. Signed-off-by: Jia-Ju Bai <[email protected]> Link: https://lore.kernel.org/r/[email protected] [put braces on all branches] Signed-off-by: Johannes Berg <[email protected]>
- Loading branch information