summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-01-19 02:23:03 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-01-19 02:23:03 +0000
commitc4c8efd02782845db7658b1885a6e509ca15a4f1 (patch)
treea738eb756c0b3cf049c426b21d90ccd9685714d8 /cpukit/libblock
parent2010-01-18 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-c4c8efd02782845db7658b1885a6e509ca15a4f1.tar.bz2
2010-01-18 Joel Sherrill <joel.sherrill@oarcorp.com>
Coverity Id 27 * libblock/src/ramdisk-config.c: Coverity notes that the calloc() is a resource leak. 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). Coverity is correct that it is never freed but this is not a problem.
Diffstat (limited to 'cpukit/libblock')
-rw-r--r--cpukit/libblock/src/ramdisk-config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpukit/libblock/src/ramdisk-config.c b/cpukit/libblock/src/ramdisk-config.c
index 34c54c4145..8ac513cdef 100644
--- a/cpukit/libblock/src/ramdisk-config.c
+++ b/cpukit/libblock/src/ramdisk-config.c
@@ -34,6 +34,14 @@ ramdisk_initialize(
if (rc != RTEMS_SUCCESSFUL)
return rc;
+ /*
+ * Coverity Id 27 notes that this calloc() is a resource leak.
+ *
+ * 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). Coverity is correct that
+ * it is never freed but this is not a problem.
+ */
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)