This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Tiny memory leak in dwarfout.c


Memory is allocated for last_filename, but it is never used.

Bootstrapped and tested on i386-unknown-netbsdelf1.5ZA.

   /Krister



2001-12-31  Krister Walfridsson  <cato@df.lth.se>

        * dwarfout.c (last_filename): Remove.
        (output_compile_unit_die): Remove last_filename.



*** gcc/gcc/dwarfout.c.bak	Tue Dec 18 18:05:28 2001
--- gcc/gcc/dwarfout.c	Mon Dec 31 16:53:15 2001
*************** static unsigned ft_entries;
*** 671,680 ****

  static const char *primary_filename;

- /* Pointer to the most recent filename for which we produced some line info.  */
-
- static const char *last_filename;
-
  /* Counter to generate unique names for DIEs.  */

  static unsigned next_unused_dienum = 1;
--- 671,676 ----
*************** output_compile_unit_die (arg)
*** 4164,4170 ****
    high_pc_attribute (TEXT_END_LABEL);
    if (debug_info_level >= DINFO_LEVEL_NORMAL)
      stmt_list_attribute (LINE_BEGIN_LABEL);
-   last_filename = xstrdup (main_input_filename);

    {
      const char *wd = getpwd ();
--- 4160,4165 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]