diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-01-19 02:23:03 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-01-19 02:23:03 +0000 |
commit | c4c8efd02782845db7658b1885a6e509ca15a4f1 (patch) | |
tree | a738eb756c0b3cf049c426b21d90ccd9685714d8 | |
parent | 2010-01-18 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-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.
-rw-r--r-- | cpukit/ChangeLog | 10 | ||||
-rw-r--r-- | cpukit/libblock/src/ramdisk-config.c | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 0bbb27296a..ab4131826f 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,15 @@ 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. + +2010-01-18 Joel Sherrill <joel.sherrill@oarcorp.com> + * libmisc/stackchk/check.c: Fix warning. 2010-01-18 Joel Sherrill <joel.sherrill@oarcorp.com> 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++) |