- PRIV(is_vax) = 1;
-#endif
- PRIV(vms_buf) = 0;
- PRIV(buf_size) = 0;
- PRIV(rec_length) = 0;
- PRIV(file_format) = FF_UNKNOWN;
- PRIV(fixup_done) = false;
- PRIV(sections) = NULL;
-
- PRIV(stack) = ((struct stack_struct *)
- bfd_malloc (sizeof (struct stack_struct) * STACKSIZE));
- if (PRIV(stack) == 0)
- {
- vms_init_no_mem1:
- free (abfd->tdata.any);
- abfd->tdata.any = 0;
- return false;
- }
- PRIV(stackptr) = 0;
-
- PRIV(vms_symbol_table) = ((struct bfd_hash_table *)
- bfd_malloc (sizeof (struct bfd_hash_table)));
- if (PRIV(vms_symbol_table) == 0)
- {
- vms_init_no_mem2:
- free (PRIV(stack));
- PRIV(stack) = 0;
- goto vms_init_no_mem1;
- }
-
- if (!bfd_hash_table_init (PRIV(vms_symbol_table), _bfd_vms_hash_newfunc))
- return false;
-
- PRIV(location_stack) = ((struct location_struct *)
- bfd_malloc (sizeof (struct location_struct)
- * LOCATION_SAVE_SIZE));
- if (PRIV(location_stack) == 0)
- {
- vms_init_no_mem3:
- free (PRIV(vms_symbol_table));
- PRIV(vms_symbol_table) = 0;
- goto vms_init_no_mem2;
- }
+ PRIV (is_vax) = 1;
+#endif
+ PRIV (vms_buf) = 0;
+ PRIV (buf_size) = 0;
+ PRIV (rec_length) = 0;
+ PRIV (file_format) = FF_UNKNOWN;
+ PRIV (fixup_done) = FALSE;
+ PRIV (sections) = NULL;
+
+ amt = sizeof (struct stack_struct) * STACKSIZE;
+ PRIV (stack) = (struct stack_struct *) bfd_alloc (abfd, amt);
+ if (PRIV (stack) == 0)
+ goto error_ret1;
+ PRIV (stackptr) = 0;
+
+ amt = sizeof (struct bfd_hash_table);
+ PRIV (vms_symbol_table) = (struct bfd_hash_table *) bfd_alloc (abfd, amt);
+ if (PRIV (vms_symbol_table) == 0)
+ goto error_ret1;
+
+ if (!bfd_hash_table_init (PRIV (vms_symbol_table), _bfd_vms_hash_newfunc))
+ goto error_ret1;
+
+ amt = sizeof (struct location_struct) * LOCATION_SAVE_SIZE;
+ PRIV (location_stack) = (struct location_struct *) bfd_alloc (abfd, amt);
+ if (PRIV (location_stack) == 0)
+ goto error_ret2;