70f88b
diff -up texinfo-6.5/contrib/fix-info-dir.orig texinfo-6.5/contrib/fix-info-dir
70f88b
--- texinfo-6.5/contrib/fix-info-dir.orig	2018-10-04 11:34:13.664483757 +0200
70f88b
+++ texinfo-6.5/contrib/fix-info-dir	2018-10-04 11:34:13.666483758 +0200
70f88b
@@ -28,7 +28,6 @@ if test -z "$LINENO"; then
70f88b
 fi
70f88b
 
70f88b
 MENU_BEGIN='^\*\([ 	]\)\{1,\}Menu:'
70f88b
-MENU_ITEM='^\* ([^ 	]).*:([ 	])+\('
70f88b
 MENU_FILTER1='s/^\*\([ 	]\)\{1,\}/* /'
70f88b
 MENU_FILTER2='s/\([ 	]\)\{1,\}$//g'
70f88b
 
70f88b
diff -up texinfo-6.5/info/echo-area.c.orig texinfo-6.5/info/echo-area.c
70f88b
--- texinfo-6.5/info/echo-area.c.orig	2017-02-04 02:02:43.000000000 +0100
70f88b
+++ texinfo-6.5/info/echo-area.c	2018-10-04 11:34:13.667483758 +0200
70f88b
@@ -979,6 +979,7 @@ info_read_completing_internal (const cha
70f88b
                 inform_in_echo_area (_("No completions"));
70f88b
               else
70f88b
                 inform_in_echo_area (_("Not complete"));
70f88b
+              free (line);
70f88b
               continue;
70f88b
             }
70f88b
         }
70f88b
diff -up texinfo-6.5/info/info.c.orig texinfo-6.5/info/info.c
70f88b
--- texinfo-6.5/info/info.c.orig	2017-07-09 17:12:57.000000000 +0200
70f88b
+++ texinfo-6.5/info/info.c	2018-10-04 11:34:13.667483758 +0200
70f88b
@@ -295,6 +295,7 @@ get_initial_file (int *argc, char ***arg
70f88b
              ref_index, ref_list, ref_slots, 2);
70f88b
 
70f88b
           initial_file = MANPAGE_FILE_BUFFER_NAME;
70f88b
+          free (man_node);
70f88b
           return;
70f88b
         }
70f88b
     }
70f88b
diff -up texinfo-6.5/info/infomap.c.orig texinfo-6.5/info/infomap.c
70f88b
--- texinfo-6.5/info/infomap.c.orig	2017-05-15 18:35:24.000000000 +0200
70f88b
+++ texinfo-6.5/info/infomap.c	2018-10-04 11:34:13.667483758 +0200
70f88b
@@ -603,6 +603,7 @@ fetch_user_maps (char *init_file)
70f88b
   compile (inf, filename, &sup_info, &sup_ea);
70f88b
 
70f88b
   free (filename);
70f88b
+  fclose (inf);
70f88b
   return 1;
70f88b
 }
70f88b
 
70f88b
diff -up texinfo-6.5/info/makedoc.c.orig texinfo-6.5/info/makedoc.c
70f88b
--- texinfo-6.5/info/makedoc.c.orig	2014-11-07 11:58:55.000000000 +0100
70f88b
+++ texinfo-6.5/info/makedoc.c	2018-10-04 11:34:13.667483758 +0200
70f88b
@@ -427,7 +427,11 @@ process_one_file (char *filename, FILE *
70f88b
 
70f88b
       offset++;
70f88b
       if (offset >= file_size)
70f88b
-        break;
70f88b
+        {
70f88b
+          free (func_name);
70f88b
+          free (func);
70f88b
+          break;
70f88b
+        }
70f88b
 
70f88b
       doc = xmalloc (1 + (offset - point));
70f88b
       strncpy (doc, buffer + point, offset - point);
70f88b
diff -up texinfo-6.5/info/m-x.c.orig texinfo-6.5/info/m-x.c
70f88b
--- texinfo-6.5/info/m-x.c.orig	2017-05-14 12:55:17.000000000 +0200
70f88b
+++ texinfo-6.5/info/m-x.c	2018-10-04 11:34:13.667483758 +0200
70f88b
@@ -81,7 +81,10 @@ DECLARE_INFO_COMMAND (describe_command,
70f88b
       InfoCommand *cmd = named_function (line);
70f88b
 
70f88b
       if (!cmd)
70f88b
-        return;
70f88b
+        {
70f88b
+          free (line);
70f88b
+          return;
70f88b
+        }
70f88b
 
70f88b
       window_message_in_echo_area ("%s: %s.",
70f88b
                                    line, function_documentation (cmd));
70f88b
diff -up texinfo-6.5/info/nodes.c.orig texinfo-6.5/info/nodes.c
70f88b
--- texinfo-6.5/info/nodes.c.orig	2017-07-09 20:51:40.000000000 +0200
70f88b
+++ texinfo-6.5/info/nodes.c	2018-10-04 11:34:13.668483758 +0200
70f88b
@@ -306,7 +306,10 @@ get_nodes_of_tags_table (FILE_BUFFER *fi
70f88b
       for (p = 0; nodedef[p] && nodedef[p] != INFO_TAGSEP; p++)
70f88b
         ;
70f88b
       if (nodedef[p] != INFO_TAGSEP)
70f88b
-        continue;
70f88b
+        {
70f88b
+          free (entry);
70f88b
+          continue;
70f88b
+        }
70f88b
 
70f88b
       entry->nodename = xmalloc (p + 1);
70f88b
       strncpy (entry->nodename, nodedef, p);
70f88b
@@ -480,6 +483,7 @@ get_tags_of_indirect_tags_table (FILE_BU
70f88b
                 }
70f88b
               file_buffer->subfiles = NULL;
70f88b
               free_file_buffer_tags (file_buffer);
70f88b
+              free (subfiles);
70f88b
               return;
70f88b
             }
70f88b
 
70f88b
diff -up texinfo-6.5/info/session.c.orig texinfo-6.5/info/session.c
70f88b
--- texinfo-6.5/info/session.c.orig	2017-07-06 20:49:26.000000000 +0200
70f88b
+++ texinfo-6.5/info/session.c	2018-10-04 11:34:13.668483758 +0200
70f88b
@@ -3554,6 +3554,7 @@ DECLARE_INFO_COMMAND (info_goto_invocati
70f88b
   if (!line)
70f88b
     {
70f88b
       info_abort_key (window, 0);
70f88b
+      free (default_program_name);
70f88b
       return;
70f88b
     }
70f88b
   if (*line)
70f88b
diff -up texinfo-6.5/info/variables.c.orig texinfo-6.5/info/variables.c
70f88b
--- texinfo-6.5/info/variables.c.orig	2017-05-03 21:48:19.000000000 +0200
70f88b
+++ texinfo-6.5/info/variables.c	2018-10-04 11:34:13.669483758 +0200
70f88b
@@ -361,6 +361,7 @@ read_variable_name (char *prompt, WINDOW
70f88b
 {
70f88b
   char *line;
70f88b
   REFERENCE **variables;
70f88b
+  VARIABLE_ALIST *alist;
70f88b
 
70f88b
   /* Get the completion array of variable names. */
70f88b
   variables = make_variable_completions_array ();
70f88b
@@ -384,7 +385,9 @@ read_variable_name (char *prompt, WINDOW
70f88b
       return NULL;
70f88b
     }
70f88b
 
70f88b
-  return variable_by_name (line);
70f88b
+  alist = variable_by_name (line);
70f88b
+  free (line);
70f88b
+  return alist;
70f88b
 }
70f88b
 
70f88b
 /* Make an array of REFERENCE which actually contains the names of the
70f88b
diff -up texinfo-6.5/install-info/install-info.c.orig texinfo-6.5/install-info/install-info.c
70f88b
--- texinfo-6.5/install-info/install-info.c.orig	2018-10-04 11:34:13.661483757 +0200
70f88b
+++ texinfo-6.5/install-info/install-info.c	2018-10-04 11:34:13.669483758 +0200
70f88b
@@ -867,10 +867,16 @@ determine_file_type:
70f88b
       char *command = concat (*compression_program, " -d", "");
70f88b
 
70f88b
       if (gzclose (f) < 0)
70f88b
-        return 0;
70f88b
+        {
70f88b
+          free (command);
70f88b
+          return 0;
70f88b
+        }
70f88b
       p = freopen (*opened_filename, FOPEN_RBIN, stdin);
70f88b
       if (!p)
70f88b
-        return 0;
70f88b
+        {
70f88b
+          free (command);
70f88b
+          return 0;
70f88b
+        }
70f88b
       p = popen (command, "r");
70f88b
       if (!p)
70f88b
         {
70f88b
@@ -880,6 +886,7 @@ determine_file_type:
70f88b
         }
70f88b
       else
70f88b
         *is_pipe = 1;
70f88b
+      free (command);
70f88b
       return p;
70f88b
     }
70f88b
   else
70f88b
@@ -923,7 +930,10 @@ readfile (char *filename, int *sizep,
70f88b
                                      &pipe_p);
70f88b
 
70f88b
   if (!f)
70f88b
-    return 0;
70f88b
+    {
70f88b
+      free (data);
70f88b
+      return 0;
70f88b
+    }
70f88b
 
70f88b
   for (;;)
70f88b
     {
70f88b
@@ -983,6 +993,7 @@ output_dirfile (char *dirfile, int dir_n
70f88b
     {
70f88b
       char *command = concat (compression_program, ">", dirfile_tmp);
70f88b
       output = popen (command, "w");
70f88b
+      free (command);
70f88b
     }
70f88b
   else
70f88b
     output = fopen (dirfile_tmp, "w");
70f88b
@@ -1724,6 +1735,8 @@ reformat_new_entries (struct spec_entry
70f88b
 
70f88b
       format_entry (name, name_len, desc, desc_len, calign, align, 
70f88b
                     maxwidth, &entry->text, &entry->text_len);
70f88b
+      free (desc);
70f88b
+      free (name);
70f88b
     }
70f88b
 }
70f88b