[PATCH] bsps/irq: fix resource leak in irq-server.c
Gedare Bloom
gedare at rtems.org
Fri Jan 3 18:50:52 UTC 2020
Resource leak identified by Coverity (CID 1456675). The value
of instances is leaked in case some but not all irq servers are
created. It should be stored in bsp_interrupt_server_instances.
---
bsps/shared/irq/irq-server.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/bsps/shared/irq/irq-server.c b/bsps/shared/irq/irq-server.c
index 0e62d76acb..93e2d144d8 100644
--- a/bsps/shared/irq/irq-server.c
+++ b/bsps/shared/irq/irq-server.c
@@ -539,6 +539,7 @@ rtems_status_code rtems_interrupt_server_initialize(
#if defined(RTEMS_SMP)
if (cpu_index > 0) {
+ bsp_interrupt_server_instances = instances;
return RTEMS_SUCCESSFUL;
}
--
2.17.1
More information about the devel
mailing list