summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/rtems
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2024-01-23 10:03:00 -0600
committerJoel Sherrill <joel@rtems.org>2024-01-31 14:01:49 -0600
commit803bba9580cc5def2c581a1df4128fcfd793f891 (patch)
tree3972c4c4d013ab52916e36add20006961f2f9d5f /rtemsbsd/rtems
parentrtemsbsd/sys/arm: Add imxrt1166 USBPHY driver (diff)
downloadrtems-libbsd-803bba9580cc5def2c581a1df4128fcfd793f891.tar.bz2
rtemsbsd/rc-conf: Avoid use after free
Diffstat (limited to 'rtemsbsd/rtems')
-rw-r--r--rtemsbsd/rtems/rtems-bsd-rc-conf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/rtemsbsd/rtems/rtems-bsd-rc-conf.c b/rtemsbsd/rtems/rtems-bsd-rc-conf.c
index f4cc987b..d34aafd9 100644
--- a/rtemsbsd/rtems/rtems-bsd-rc-conf.c
+++ b/rtemsbsd/rtems/rtems-bsd-rc-conf.c
@@ -714,6 +714,7 @@ rc_conf_worker(rtems_task_argument task_argument)
rtems_chain_node* node = rtems_chain_first(&services);
int r = 0;
int error;
+ bool rc_conf_verbose;
/*
* Check for a syslog priority before any services are run.
@@ -748,6 +749,8 @@ rc_conf_worker(rtems_task_argument task_argument)
if (r < 0)
rc_conf->error_code = error;
+ rc_conf_verbose = rc_conf->verbose;
+
/*
* If there is a waiter signal else clean up because the waiter has gone.
*/
@@ -760,7 +763,7 @@ rc_conf_worker(rtems_task_argument task_argument)
rc_conf_destroy(rc_conf);
}
- if (rc_conf->verbose)
+ if (rc_conf_verbose)
printf("rc.conf: finished\n");
rtems_task_exit();