aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mn10300.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2001-10-05 07:49:24 +0000
committerAlexandre Oliva <aoliva@redhat.com>2001-10-05 07:49:24 +0000
commit7dc8f5ceeca255c8f31ae2bc090749baf14d4d64 (patch)
treeece882610f81e1682f059e15ce33574e3360ba1b /gas/config/tc-mn10300.c
parent5abe4e058f768c6e6fce80ffe91ceacac997f2af (diff)
downloadgdb-7dc8f5ceeca255c8f31ae2bc090749baf14d4d64.zip
gdb-7dc8f5ceeca255c8f31ae2bc090749baf14d4d64.tar.gz
gdb-7dc8f5ceeca255c8f31ae2bc090749baf14d4d64.tar.bz2
* config/tc-mn10300.c (tc_gen_reloc): Don't free
reloc->sym_ptr_ptr if it's not allocated.
Diffstat (limited to 'gas/config/tc-mn10300.c')
-rw-r--r--gas/config/tc-mn10300.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c
index a2acc75..dbc9ffd 100644
--- a/gas/config/tc-mn10300.c
+++ b/gas/config/tc-mn10300.c
@@ -1779,6 +1779,8 @@ tc_gen_reloc (seg, fixp)
if (fixp->fx_addsy && fixp->fx_subsy)
{
+ reloc->sym_ptr_ptr = NULL;
+
/* If we got a difference between two symbols, and the
subtracted symbol is in the current section, use a
PC-relative relocation. If both symbols are in the same
@@ -1856,7 +1858,8 @@ tc_gen_reloc (seg, fixp)
}
}
- free (reloc->sym_ptr_ptr);
+ if (reloc->sym_ptr_ptr)
+ free (reloc->sym_ptr_ptr);
free (reloc);
return NULL;
}