_bfd_alloc_and_read
[deliverable/binutils-gdb.git] / bfd / vms-lib.c
index dc07e79710c39624cc93b4c7130bf6287f0cb48d..6ae1a7bafbd4ff82b10ac8332a0ddbeace53352e 100644 (file)
@@ -568,14 +568,9 @@ _bfd_vms_lib_archive_p (bfd *abfd, enum vms_lib_kind kind)
          != sizeof (buf_reclen))
        goto err;
       reclen = bfd_getl32 (buf_reclen);
-      buf = bfd_malloc (reclen);
+      buf = _bfd_malloc_and_read (abfd, reclen, reclen);
       if (buf == NULL)
        goto err;
-      if (bfd_bread (buf, reclen, abfd) != reclen)
-       {
-         free (buf);
-         goto err;
-       }
       map = (struct vms_dcxmap *)buf;
       tdata->nbr_dcxsbm = bfd_getl16 (map->nsubs);
       sbm_off = bfd_getl16 (map->sub0);
This page took 0.025122 seconds and 4 git commands to generate.