aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2001-06-01 21:17:50 +0000
committerJim Blandy <jimb@codesourcery.com>2001-06-01 21:17:50 +0000
commitd0bbfec7b60c10ff4bda54e7a4b72233c5ad1fb2 (patch)
tree96dd3059ce33a5a03fffe4d653641f3995cec476 /gdb
parent531017dfa40f63d3ff26cb80e0962a68eedbbccf (diff)
downloadgdb-d0bbfec7b60c10ff4bda54e7a4b72233c5ad1fb2.zip
gdb-d0bbfec7b60c10ff4bda54e7a4b72233c5ad1fb2.tar.gz
gdb-d0bbfec7b60c10ff4bda54e7a4b72233c5ad1fb2.tar.bz2
* partial-stab.h (case N_FUN: case 'f':, case N_FUN: case 'F':)
Fix memory leak.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/partial-stab.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f5a7ac4..f3a4026 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2001-06-01 Jim Blandy <jimb@redhat.com>
+ * partial-stab.h (case N_FUN: case 'f':, case N_FUN: case 'F':)
+ Fix memory leak.
+
* partial-stab.h: New complaint: function_outside_compilation_unit.
(case N_FUN: case 'f':, case N_FUN: case 'F':): If pst is zero,
complain, and don't try to set pst's start address.
diff --git a/gdb/partial-stab.h b/gdb/partial-stab.h
index d6c6fd5..ebedef7 100644
--- a/gdb/partial-stab.h
+++ b/gdb/partial-stab.h
@@ -586,6 +586,7 @@ switch (CUR_SYMBOL_TYPE)
memcpy (name, namestring, name_len);
name[name_len] = '\0';
complain (&function_outside_compilation_unit, name);
+ xfree (name);
}
CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
#ifdef DBXREAD_ONLY
@@ -640,6 +641,7 @@ switch (CUR_SYMBOL_TYPE)
memcpy (name, namestring, name_len);
name[name_len] = '\0';
complain (&function_outside_compilation_unit, name);
+ xfree (name);
}
CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
#ifdef DBXREAD_ONLY