2001-02-19 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>
Mon, 19 Feb 2001 18:56:11 +0000 (18:56 +0000)
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>
Mon, 19 Feb 2001 18:56:11 +0000 (18:56 +0000)
        From Andrew Cagney  <cagney@b1.cygnus.com>:
* symfile.c (add_symbol_file_command): Always initialize
  my_cleanup using a NULL cleanup.

gdb/ChangeLog
gdb/symfile.c

index fada1562fb7470a15b9b0d3d5e3b9175836dbbbf..5a3fdc515f165d0e2fabf31a4d687738cad4be3a 100644 (file)
@@ -1,3 +1,9 @@
+2001-02-19  Elena Zannoni  <ezannoni@kwikemart.cygnus.com>
+
+        From Andrew Cagney  <cagney@b1.cygnus.com>:
+       * symfile.c (add_symbol_file_command): Always initialize
+       my_cleanup using a NULL cleanup.
+
 2001-02-19  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * demangle.c (demangling_style_names): New variable.
index e4bc6f61dc8c594879fb29d71e74ad54955e9601..2222d74b9c93a7cb54813564bcd17c8773a43784 100644 (file)
@@ -1420,7 +1420,7 @@ add_symbol_file_command (char *args, int from_tty)
   } sect_opts[SECT_OFF_MAX];
 
   struct section_addr_info section_addrs;
-  struct cleanup *my_cleanups;
+  struct cleanup *my_cleanups = make_cleanup (null_cleanup, NULL);
 
   dont_repeat ();
 
@@ -1456,7 +1456,7 @@ add_symbol_file_command (char *args, int from_tty)
        {
          /* The first argument is the file name. */
          filename = tilde_expand (arg);
-         my_cleanups = make_cleanup (xfree, filename);
+         make_cleanup (xfree, filename);
        }
       else
        if (argcnt == 1)