aboutsummaryrefslogtreecommitdiff
path: root/bfd/opncls.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-07-24 19:58:06 +0000
committerMichael Snyder <msnyder@vmware.com>2007-07-24 19:58:06 +0000
commitf6eea5aed8e0b3c097bbeaf9180ff6898ef9389c (patch)
tree45ad9ddd318780019f9960f589baf907d8df3482 /bfd/opncls.c
parentd0f16d5ecee58c911ec135380b56d1fbb93dc03e (diff)
downloadbinutils-f6eea5aed8e0b3c097bbeaf9180ff6898ef9389c.zip
binutils-f6eea5aed8e0b3c097bbeaf9180ff6898ef9389c.tar.gz
binutils-f6eea5aed8e0b3c097bbeaf9180ff6898ef9389c.tar.bz2
2007-07-23 Michael Snyder <msnyder@access-company.com>
* opncls.c (bfd_make_writable): Check return from bfd_malloc.
Diffstat (limited to 'bfd/opncls.c')
-rw-r--r--bfd/opncls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/opncls.c b/bfd/opncls.c
index 01c8889..02066d8 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -799,6 +799,8 @@ bfd_make_writable (bfd *abfd)
}
bim = bfd_malloc (sizeof (struct bfd_in_memory));
+ if (bim == NULL)
+ return FALSE; /* bfd_error already set. */
abfd->iostream = bim;
/* bfd_bwrite will grow these as needed. */
bim->size = 0;