aboutsummaryrefslogtreecommitdiff
path: root/bfd/peXXigen.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/peXXigen.c')
-rw-r--r--bfd/peXXigen.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index ee6da64..ab0da7f 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -1216,7 +1216,10 @@ _bfd_XXi_write_codeview_record (bfd * abfd, file_ptr where, CODEVIEW_INFO *cvinf
if (bfd_seek (abfd, where, SEEK_SET) != 0)
return 0;
- buffer = xmalloc (size);
+ buffer = bfd_malloc (size);
+ if (buffer == NULL)
+ return 0;
+
cvinfo70 = (CV_INFO_PDB70 *) buffer;
H_PUT_32 (abfd, CVINFO_PDB70_CVSIGNATURE, cvinfo70->CvSignature);