mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 00:38:39 +08:00
DEVICE(9): Avoid NULL pointer access
This commit is contained in:
@@ -272,6 +272,9 @@ device_sysctl_handler(SYSCTL_HANDLER_ARGS)
|
||||
break;
|
||||
case DEVICE_SYSCTL_PARENT:
|
||||
value = dev->parent ? dev->parent->nameunit : "";
|
||||
#ifdef __rtems__
|
||||
value = value ? value : "";
|
||||
#endif /* __rtems__ */
|
||||
break;
|
||||
default:
|
||||
return (EINVAL);
|
||||
|
Reference in New Issue
Block a user