Replace bfd_alloc/bfd_malloc + memset with bfd_zalloc/bfd_zmalloc
[platform/upstream/binutils.git] / bfd / ieee.c
index 4e7f3a3..2433cc4 100644 (file)
@@ -2398,10 +2398,9 @@ do_with_relocs (abfd, s)
       if ((PTR) stream == (PTR) NULL)
        {
          /* Outputting a section without data, fill it up */
-         stream = (unsigned char *) (bfd_alloc (abfd, s->_raw_size));
+         stream = (unsigned char *) bfd_zalloc (abfd, s->_raw_size);
          if (!stream)
            return false;
-         memset ((PTR) stream, 0, (size_t) s->_raw_size);
        }
       while (current_byte_index < s->_raw_size)
        {