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>
+
+ * 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.
/* 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;
languages[i]->la_name + 1);
}
- xfree (language_set_doc);
language_set_doc = ui_file_xstrdup (tmp_stream, NULL);
ui_file_delete (tmp_stream);
set_language_command,
show_language_command,
&setlist, &showlist);
+
+ xfree (language_set_doc);
}
/* Iterate through all registered languages looking for and calling
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)
{
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);
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