aboutsummaryrefslogtreecommitdiff
path: root/bfd/aoutx.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-04-04 23:44:13 +0000
committerIan Lance Taylor <ian@airs.com>1994-04-04 23:44:13 +0000
commitc4dd531f11649c6143ef5bad2390374512e5828b (patch)
tree8dc6fc03fbad388a56d5cebd1888d41a1bc1b632 /bfd/aoutx.h
parent8055d512fb1870feb828fb98187ae8032032c204 (diff)
downloadgdb-c4dd531f11649c6143ef5bad2390374512e5828b.zip
gdb-c4dd531f11649c6143ef5bad2390374512e5828b.tar.gz
gdb-c4dd531f11649c6143ef5bad2390374512e5828b.tar.bz2
* aoutx.h (NAME(aout,bfd_free_cached_info)): Don't free anything
if we don't have a bfd_object.
Diffstat (limited to 'bfd/aoutx.h')
-rw-r--r--bfd/aoutx.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 5d94fb4..2bd29ec 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -2880,6 +2880,9 @@ NAME(aout,bfd_free_cached_info) (abfd)
{
asection *o;
+ if (bfd_get_format (abfd) != bfd_object)
+ return true;
+
#define FREE(x) if (x != NULL) { free (x); x = NULL; }
FREE (obj_aout_symbols (abfd));
FREE (obj_aout_external_syms (abfd));