From: Alexandre Oliva Date: Fri, 5 Oct 2001 07:49:24 +0000 (+0000) Subject: * config/tc-mn10300.c (tc_gen_reloc): Don't free X-Git-Tag: cygnus_cvs_20020108_pre~1142 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7dc8f5ceeca255c8f31ae2bc090749baf14d4d64;p=external%2Fbinutils.git * config/tc-mn10300.c (tc_gen_reloc): Don't free reloc->sym_ptr_ptr if it's not allocated. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index c35a822..e1588d2 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2001-10-05 Alexandre Oliva + + * config/tc-mn10300.c (tc_gen_reloc): Don't free + reloc->sym_ptr_ptr if it's not allocated. + 2001-10-04 Thiemo Seufer * config/tc-mips.c (prev_insn_reloc_type): Make it an array to hold a 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; }