[Bug 1690] New: ramdisk leaks memory
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Thu Aug 26 08:43:49 UTC 2010
https://www.rtems.org/bugzilla/show_bug.cgi?id=1690
Summary: ramdisk leaks memory
Product: RTEMS
Version: HEAD
Platform: All
OS/Version: RTEMS
Status: NEW
Severity: normal
Priority: P3
Component: filesystem
AssignedTo: chrisj at rtems.org
ReportedBy: ralf.corsepius at rtems.org
In http://scan2.coverity.com:9104/cov.cgi?cid=26
JoelSherrill wrote on 2010-01-19 03:17:
This is allocating memory for a RAM disk which will persist for the life of the
system. RTEMS has no "de-initialize" driver call so there is no corresponding
free(r).
Later this was closed as "Ignore"/"Intentional"
Though I agree that closing this CID this way is appropriate,
I think this actually needs fixing in longer term.
Context:
cpukit/libblock/src/ramdisk-config.c:
...
ramdisk_initialize()
...
Event alloc_fn: Calling allocation function "calloc".
Event var_assign: Assigning: "r" = storage returned from
"calloc(rtems_ramdisk_configuration_size, sizeof (struct ramdisk) /*16*/)".
49 r = calloc(rtems_ramdisk_configuration_size, sizeof(struct
ramdisk));
50 r->trace = false;
...
Event leaked_storage: Variable "r" going out of scope leaks the storage it
points to.
89 return RTEMS_SUCCESSFUL;
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list