Avoid memory leaks on struct cmd_list_element.doc field.
[binutils-gdb.git] / gdb / ChangeLog
index 117b51606c270f7e4c1a76fa72184e613eaaa0a8..c7a8346ac055ffd51f1a93d587b807c8d1058e8f 100644 (file)
@@ -1,3 +1,15 @@
+2012-12-05  Pierre Muller  <muller@sourceware.org>
+
+       Avoid memory leaks on struct cmd_list_element.doc field.
+       * cli/cli-decode.c (add_alias_cmd): Make a copy of doc field
+       if flags contains DOC_ALLOCATED.
+       (add_setshow_cmd_full): Add DOC_ALLOCATED to set and show
+       flags.
+       (delete_cmd): Handle DOC_ALLOCATED flag.
+       * cli/cli-decode.h (DOC_ALLOCATED): New macro for use
+       in flags filed of struct cmd_list_element.
+       (struct cmd_list_element): Document new flag item.
+
 2012-12-04  Doug Evans  <dje@google.com>
 
        * symmisc.c: Whitespace fixes.