aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-08-18 16:17:16 +0000
committerTom Tromey <tromey@redhat.com>2009-08-18 16:17:16 +0000
commit1eefb8588aa1c49d7d5a5c96c16c3b790ab2e802 (patch)
treef0f61b0c2b5247cbb09db68860035744d82253d1 /gdb
parenta8d1234eac953c71e48f3c09d9254976381c27cf (diff)
downloadgdb-1eefb8588aa1c49d7d5a5c96c16c3b790ab2e802.zip
gdb-1eefb8588aa1c49d7d5a5c96c16c3b790ab2e802.tar.gz
gdb-1eefb8588aa1c49d7d5a5c96c16c3b790ab2e802.tar.bz2
* utils.c (add_internal_problem_command): Free set_doc and
show_doc. * remote.c (add_packet_config_cmd): Free set_doc and show_doc. * language.c (add_language): Free language_set_doc.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/language.c5
-rw-r--r--gdb/remote.c3
-rw-r--r--gdb/utils.c6
4 files changed, 19 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cf5b0db..7f9db68 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2009-08-18 Tom Tromey <tromey@redhat.com>
+ * utils.c (add_internal_problem_command): Free set_doc and
+ show_doc.
+ * remote.c (add_packet_config_cmd): Free set_doc and show_doc.
+ * language.c (add_language): Free language_set_doc.
+
+2009-08-18 Tom Tromey <tromey@redhat.com>
+
* Makefile.in (ALL_TARGET_OBS): Remove prologue-value.o, solib.o.
2009-08-17 Ulrich Weigand <uweigand@de.ibm.com>
diff --git a/gdb/language.c b/gdb/language.c
index d975f23..51a49f8 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -884,7 +884,7 @@ add_language (const struct language_defn *lang)
/* For the "set language" command. */
static char **language_names = NULL;
/* For the "help set language" command. */
- static char *language_set_doc = NULL;
+ char *language_set_doc = NULL;
int i;
struct ui_file *tmp_stream;
@@ -943,7 +943,6 @@ local or auto Automatic setting based on source file\n"));
languages[i]->la_name + 1);
}
- xfree (language_set_doc);
language_set_doc = ui_file_xstrdup (tmp_stream, NULL);
ui_file_delete (tmp_stream);
@@ -955,6 +954,8 @@ Show the current source language."), NULL,
set_language_command,
show_language_command,
&setlist, &showlist);
+
+ xfree (language_set_doc);
}
/* Iterate through all registered languages looking for and calling
diff --git a/gdb/remote.c b/gdb/remote.c
index 4c58abb..e2672d3 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -865,6 +865,9 @@ add_packet_config_cmd (struct packet_config *config, const char *name,
set_remote_protocol_packet_cmd,
show_remote_protocol_packet_cmd,
&remote_set_cmdlist, &remote_show_cmdlist);
+ /* The command code copies the documentation strings. */
+ xfree (set_doc);
+ xfree (show_doc);
/* set/show remote NAME-packet {auto,on,off} -- legacy. */
if (legacy)
{
diff --git a/gdb/utils.c b/gdb/utils.c
index 5fa2f26..16ad084 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1098,6 +1098,9 @@ Show whether GDB will quit when an %s is detected"),
set_cmd_list,
show_cmd_list);
+ xfree (set_doc);
+ xfree (show_doc);
+
set_doc = xstrprintf (_("\
Set whether GDB should create a core file of GDB when %s is detected"),
problem->name);
@@ -1114,6 +1117,9 @@ Show whether GDB will create a core file of GDB when %s is detected"),
NULL, /* showfunc */
set_cmd_list,
show_cmd_list);
+
+ xfree (set_doc);
+ xfree (show_doc);
}
/* Print the system error message for errno, and also mention STRING