aboutsummaryrefslogtreecommitdiff
path: root/gas/dwarf2dbg.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-03-10 00:52:09 +0000
committerMichael Snyder <msnyder@vmware.com>2011-03-10 00:52:09 +0000
commit9f6db0d3fd276c9aeaf31a9d88153b05a66d17f9 (patch)
treebee08131219bd0a1f8b979048ccf2b18bc9a140c /gas/dwarf2dbg.c
parent68d6df83d04fd6dd04f1bbc696cece9701808998 (diff)
downloadgdb-9f6db0d3fd276c9aeaf31a9d88153b05a66d17f9.zip
gdb-9f6db0d3fd276c9aeaf31a9d88153b05a66d17f9.tar.gz
gdb-9f6db0d3fd276c9aeaf31a9d88153b05a66d17f9.tar.bz2
2011-03-09 Michael Snyder <msnyder@vmware.com>
* dwarf2dbg.c (out_file_list): Free malloced 'dir'. (out_debug_info): Free malloced 'dirname' and 'comp_dir'. (emit_fixed_inc_line_addr): Assign instead of conditional in assert.
Diffstat (limited to 'gas/dwarf2dbg.c')
-rw-r--r--gas/dwarf2dbg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index 587920f..92fc570 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -1080,7 +1080,7 @@ emit_fixed_inc_line_addr (int line_delta, addressT addr_delta, fragS *frag,
symbolS *to_sym;
expressionS exp;
- gas_assert (pexp->X_op = O_subtract);
+ gas_assert (pexp->X_op == O_subtract);
to_sym = pexp->X_add_symbol;
*p++ = DW_LNS_extended_op;
@@ -1328,6 +1328,7 @@ out_file_list (void)
size = strlen (dir) + 1;
cp = frag_more (size);
memcpy (cp, dir, size);
+ xfree ((char *) dir);
}
/* Terminate it. */
out_byte ('\0');
@@ -1684,6 +1685,7 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg, segT ranges_seg)
memcpy (p, dirname, len);
INSERT_DIR_SEPARATOR (p, len);
#endif
+ xfree ((char *) dirname);
}
len = strlen (files[1].filename) + 1;
p = frag_more (len);
@@ -1694,6 +1696,7 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg, segT ranges_seg)
len = strlen (comp_dir) + 1;
p = frag_more (len);
memcpy (p, comp_dir, len);
+ xfree ((char *) comp_dir);
/* DW_AT_producer */
sprintf (producer, "GNU AS %s", VERSION);