aboutsummaryrefslogtreecommitdiff
path: root/bfd/linker.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/linker.c')
-rw-r--r--bfd/linker.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/bfd/linker.c b/bfd/linker.c
index 3820ce1..d405746 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -2661,13 +2661,11 @@ default_indirect_link_order (bfd *output_bfd,
new_contents, loc, input_section->size))
goto error_return;
- if (contents != NULL)
- free (contents);
+ free (contents);
return TRUE;
error_return:
- if (contents != NULL)
- free (contents);
+ free (contents);
return FALSE;
}
@@ -2894,10 +2892,8 @@ _bfd_handle_already_linked (asection *sec,
(_("%pB: duplicate section `%pA' has different contents\n"),
sec->owner, sec);
- if (sec_contents)
- free (sec_contents);
- if (l_sec_contents)
- free (l_sec_contents);
+ free (sec_contents);
+ free (l_sec_contents);
}
break;
}