[rtems commit] libdl: Add a comment to the previous fix.
Chris Johns
chrisj at rtems.org
Wed Nov 19 21:39:03 UTC 2014
Module: rtems
Branch: master
Commit: 80590a8ecffbe3d61a28ccb64d2dc04a0612e52b
Changeset: http://git.rtems.org/rtems/commit/?id=80590a8ecffbe3d61a28ccb64d2dc04a0612e52b
Author: Chris Johns <chrisj at rtems.org>
Date: Thu Nov 20 08:38:28 2014 +1100
libdl: Add a comment to the previous fix.
The fix is ref #2191.
---
cpukit/libdl/rtl-allocator.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/cpukit/libdl/rtl-allocator.c b/cpukit/libdl/rtl-allocator.c
index 26044c2..ced19d0 100644
--- a/cpukit/libdl/rtl-allocator.c
+++ b/cpukit/libdl/rtl-allocator.c
@@ -61,6 +61,9 @@ 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);
+ /*
+ * Only zero the memory if asked to and the allocation was successful.
+ */
if (address && zero)
memset (address, 0, size);
More information about the vc
mailing list