diff options
author | Chris Johns <chrisj@rtems.org> | 2014-11-20 08:30:01 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2014-11-20 08:30:01 +1100 |
commit | 90f65007e96b98362aacdc39f6f730956324b94c (patch) | |
tree | 780af506c6a12aa66b7320be112803df022c5326 /cpukit/libdl/rtl-allocator.c | |
parent | Fix type in MAINTAINERS. (diff) | |
download | rtems-90f65007e96b98362aacdc39f6f730956324b94c.tar.bz2 |
libdl: Fix allocator NULL check (Coverity 1255328) refs #2191
The address returned from the allocator call was not checked when zeroing
the memory.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libdl/rtl-allocator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/libdl/rtl-allocator.c b/cpukit/libdl/rtl-allocator.c index b845013fd8..26044c2c49 100644 --- a/cpukit/libdl/rtl-allocator.c +++ b/cpukit/libdl/rtl-allocator.c @@ -61,7 +61,7 @@ rtems_rtl_alloc_new (rtems_rtl_alloc_tag_t tag, size_t size, bool zero) printf ("rtl: alloc: new: %s addr=%p size=%zu\n", rtems_rtl_trace_tag_label (tag), address, size); - if (zero) + if (address && zero) memset (address, 0, size); return address; |