[RTEMS Project] #4298: nvdisk.c: Resource leak error spotted by Coverity
RTEMS trac
trac at rtems.org
Thu Mar 4 16:02:48 UTC 2021
#4298: nvdisk.c: Resource leak error spotted by Coverity
------------------------+--------------------
Reporter: Ryan Long | Owner: (none)
Type: defect | Status: new
Priority: normal | Milestone: 6.1
Component: lib/block | Version: 6
Severity: normal | Keywords:
Blocked By: | Blocking:
------------------------+--------------------
CID 1439297: Resource leak in rtems_nvdisk_initialize().
{{{
768 nvd->devices = calloc (c->device_count, sizeof
(rtems_nvdisk_device_ctl));
6. Condition !nvd->devices, taking true branch.
769 if (!nvd->devices)
CID 1439297 (#2 of 2): Resource leak (RESOURCE_LEAK)7. leaked_storage:
Variable nvd going out of scope leaks the storage it points to.
770 return RTEMS_NO_MEMORY;
}}}
--
Ticket URL: <http://devel.rtems.org/ticket/4298>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list