diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2026-01-15 13:51:17 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2026-01-15 13:51:17 +0000 |
| commit | aa1eb623389008c95b897976f4d28a7fe0acd93c (patch) | |
| tree | 719c8a06a0aa40e3a8ca6a8be391659c4411ae02 | |
| parent | a4955b0143361900140df640d116891f047f5431 (diff) | |
linuxkpi: Avoid a potential null pointer dereference in an error path
Reported by: Kevin Day <kevin@your.org>
Reviewed by: bz, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54672
| -rw-r--r-- | sys/compat/linuxkpi/common/src/linux_firmware.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_firmware.c b/sys/compat/linuxkpi/common/src/linux_firmware.c index 12658df5ce83..0c6d855501ef 100644 --- a/sys/compat/linuxkpi/common/src/linux_firmware.c +++ b/sys/compat/linuxkpi/common/src/linux_firmware.c @@ -66,7 +66,8 @@ _linuxkpi_request_firmware(const char *fw_name, const struct linuxkpi_firmware * uint32_t flags; if (fw_name == NULL || fw == NULL || dev == NULL) { - *fw = NULL; + if (fw != NULL) + *fw = NULL; return (-EINVAL); } |
