[PATCH] bsps/irq: fix resource leak in irq-server.c

Gedare Bloom gedare at rtems.org
Mon Jan 6 18:07:57 UTC 2020


Hi Sebastian,

I pushed this patch, can you just double check the intention is right?
I think you wrote the original code.

On Fri, Jan 3, 2020 at 11:50 AM Gedare Bloom <gedare at rtems.org> wrote:
>
> 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