[PATCH 0/5] Fix Resource leak Coverity issues

Ryan Long ryan.long at oarcorp.com
Fri Mar 12 15:18:41 UTC 2021


Hi,

For these issues I just needed to free dynamically allocated variables.
Most of these additions were in areas that were error-checking and
returning early. For flashdisk.c, this was the case as well, but it had
nested, dynamically allocated list of values that had to be freed using
a for loop.

Thanks,
Ryan 

Ryan Long (5):
  hexdump-parse.c: Fix Resource leak (CID #26032)
  rtems-fdt.c: Fix Resource leak (CID #1437645)
  nvdisk.c: Fix Resource leak (CID #1439297)
  flashdisk.c: Fix Resource leak (CID #1439298)
  rtl-shell.c: Resource leak (CID #1444140)

 cpukit/libblock/src/flashdisk.c      | 42 ++++++++++++++++++++++++++----------
 cpukit/libblock/src/nvdisk.c         |  8 ++++++-
 cpukit/libdl/rtl-shell.c             |  3 +++
 cpukit/libmisc/rtems-fdt/rtems-fdt.c |  1 +
 cpukit/libmisc/shell/hexdump-parse.c |  3 +++
 5 files changed, 45 insertions(+), 12 deletions(-)

-- 
1.8.3.1



More information about the devel mailing list