Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#2462 assigned defect

shared/gpio.c possible memory leaks

Reported by: Gedare Bloom Owned by: Needs Funding
Priority: normal Milestone: Indefinite
Component: unspecified Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

rtems_gpio_enable_interrupt() in libbsp/shared/gpio.c should free the interrupt_state in case of a failure to rtems_gpio_interrupt_handler_install.

Also, the "if ( threaded_handling ) {" section the two error paths that return RTEMS_UNSATISFIED should undo the rtems_gpio_interrupt_handler_install of the pin handler and also free the interrupt_state.

Change History (3)

comment:1 Changed on 11/09/15 at 18:46:21 by Gedare Bloom

Milestone: 4.11.14.12
Version: 4.114.12

comment:2 Changed on 11/11/15 at 15:56:13 by Gedare Bloom <gedare@…>

In [changeset:"f8bdd12a48d82a26cd9ddb84bdfa1544a4592e0d/rtems"]:

gpio: free memory in error path

Updates #2462.

comment:3 Changed on 02/15/17 at 14:20:42 by Sebastian Huber

Milestone: 4.12Indefinite
Owner: set to Needs Funding
Status: newassigned
Note: See TracTickets for help on using tickets.