bc2165c
diff -up texinfo-6.5.91/contrib/fix-info-dir.p7 texinfo-6.5.91/contrib/fix-info-dir
bc2165c
--- texinfo-6.5.91/contrib/fix-info-dir.p7	2019-01-21 10:52:18.453973008 +0100
bc2165c
+++ texinfo-6.5.91/contrib/fix-info-dir	2019-01-21 10:52:18.456973012 +0100
1585d1f
@@ -28,7 +28,6 @@ if test -z "$LINENO"; then
1585d1f
 fi
1585d1f
 
1585d1f
 MENU_BEGIN='^\*\([ 	]\)\{1,\}Menu:'
1585d1f
-MENU_ITEM='^\* ([^ 	]).*:([ 	])+\('
1585d1f
 MENU_FILTER1='s/^\*\([ 	]\)\{1,\}/* /'
1585d1f
 MENU_FILTER2='s/\([ 	]\)\{1,\}$//g'
1585d1f
 
bc2165c
diff -up texinfo-6.5.91/info/infomap.c.p7 texinfo-6.5.91/info/infomap.c
bc2165c
--- texinfo-6.5.91/info/infomap.c.p7	2019-01-13 12:43:10.000000000 +0100
bc2165c
+++ texinfo-6.5.91/info/infomap.c	2019-01-21 10:52:18.457973013 +0100
bc2165c
@@ -589,6 +589,7 @@ fetch_user_maps (char *init_file)
1585d1f
   compile (inf, filename, &sup_info, &sup_ea);
1585d1f
 
1585d1f
   free (filename);
1585d1f
+  fclose (inf);
1585d1f
   return 1;
1585d1f
 }
1585d1f
 
bc2165c
diff -up texinfo-6.5.91/info/makedoc.c.p7 texinfo-6.5.91/info/makedoc.c
bc2165c
--- texinfo-6.5.91/info/makedoc.c.p7	2019-01-13 12:43:10.000000000 +0100
bc2165c
+++ texinfo-6.5.91/info/makedoc.c	2019-01-21 10:52:18.457973013 +0100
bc2165c
@@ -425,7 +425,11 @@ process_one_file (char *filename, FILE *
1585d1f
 
1585d1f
       offset++;
1585d1f
       if (offset >= file_size)
1585d1f
-        break;
1585d1f
+        {
1585d1f
+          free (func_name);
1585d1f
+          free (func);
1585d1f
+          break;
1585d1f
+        }
1585d1f
 
1585d1f
       doc = xmalloc (1 + (offset - point));
1585d1f
       strncpy (doc, buffer + point, offset - point);
bc2165c
diff -up texinfo-6.5.91/info/m-x.c.p7 texinfo-6.5.91/info/m-x.c
bc2165c
--- texinfo-6.5.91/info/m-x.c.p7	2019-01-13 12:43:10.000000000 +0100
bc2165c
+++ texinfo-6.5.91/info/m-x.c	2019-01-21 10:52:18.457973013 +0100
bc2165c
@@ -79,7 +79,10 @@ DECLARE_INFO_COMMAND (describe_command,
bc2165c
       InfoCommand *cmd = named_function (line);
bc2165c
 
bc2165c
       if (!cmd)
bc2165c
-        return;
bc2165c
+        {
bc2165c
+          free (line);
bc2165c
+          return;
bc2165c
+        }
bc2165c
 
bc2165c
       window_message_in_echo_area ("%s: %s.",
bc2165c
                                    line, function_documentation (cmd));
bc2165c
diff -up texinfo-6.5.91/info/nodes.c.p7 texinfo-6.5.91/info/nodes.c
bc2165c
--- texinfo-6.5.91/info/nodes.c.p7	2019-01-13 12:43:10.000000000 +0100
bc2165c
+++ texinfo-6.5.91/info/nodes.c	2019-01-21 10:52:18.457973013 +0100
bc2165c
@@ -303,7 +303,10 @@ get_nodes_of_tags_table (FILE_BUFFER *fi
1585d1f
       for (p = 0; nodedef[p] && nodedef[p] != INFO_TAGSEP; p++)
1585d1f
         ;
1585d1f
       if (nodedef[p] != INFO_TAGSEP)
1585d1f
-        continue;
1585d1f
+        {
1585d1f
+          free (entry);
1585d1f
+          continue;
1585d1f
+        }
1585d1f
 
1585d1f
       entry->nodename = xmalloc (p + 1);
1585d1f
       strncpy (entry->nodename, nodedef, p);
bc2165c
@@ -477,6 +480,7 @@ get_tags_of_indirect_tags_table (FILE_BU
1585d1f
                 }
1585d1f
               file_buffer->subfiles = NULL;
1585d1f
               free_file_buffer_tags (file_buffer);
1585d1f
+              free (subfiles);
1585d1f
               return;
1585d1f
             }
1585d1f
 
bc2165c
diff -up texinfo-6.5.91/info/session.c.p7 texinfo-6.5.91/info/session.c
bc2165c
--- texinfo-6.5.91/info/session.c.p7	2019-01-13 12:43:10.000000000 +0100
bc2165c
+++ texinfo-6.5.91/info/session.c	2019-01-21 10:52:18.458973014 +0100
bc2165c
@@ -3552,6 +3552,7 @@ DECLARE_INFO_COMMAND (info_goto_invocati
1585d1f
   if (!line)
1585d1f
     {
1585d1f
       info_abort_key (window, 0);
1585d1f
+      free (default_program_name);
1585d1f
       return;
1585d1f
     }
1585d1f
   if (*line)
bc2165c
diff -up texinfo-6.5.91/info/variables.c.p7 texinfo-6.5.91/info/variables.c
bc2165c
--- texinfo-6.5.91/info/variables.c.p7	2019-01-13 12:43:10.000000000 +0100
bc2165c
+++ texinfo-6.5.91/info/variables.c	2019-01-21 10:52:18.459973015 +0100
bc2165c
@@ -359,6 +359,7 @@ read_variable_name (char *prompt, WINDOW
1585d1f
 {
1585d1f
   char *line;
1585d1f
   REFERENCE **variables;
1585d1f
+  VARIABLE_ALIST *alist;
1585d1f
 
1585d1f
   /* Get the completion array of variable names. */
1585d1f
   variables = make_variable_completions_array ();
bc2165c
@@ -382,7 +383,9 @@ read_variable_name (char *prompt, WINDOW
1585d1f
       return NULL;
1585d1f
     }
1585d1f
 
1585d1f
-  return variable_by_name (line);
1585d1f
+  alist = variable_by_name (line);
1585d1f
+  free (line);
1585d1f
+  return alist;
1585d1f
 }
1585d1f
 
1585d1f
 /* Make an array of REFERENCE which actually contains the names of the
bc2165c
diff -up texinfo-6.5.91/install-info/install-info.c.p7 texinfo-6.5.91/install-info/install-info.c
bc2165c
--- texinfo-6.5.91/install-info/install-info.c.p7	2019-01-21 10:52:18.447973002 +0100
bc2165c
+++ texinfo-6.5.91/install-info/install-info.c	2019-01-21 10:52:18.460973016 +0100
bc2165c
@@ -864,10 +864,16 @@ determine_file_type:
1585d1f
       char *command = concat (*compression_program, " -d", "");
1585d1f
 
1585d1f
       if (gzclose (f) < 0)
1585d1f
-        return 0;
1585d1f
+        {
1585d1f
+          free (command);
1585d1f
+          return 0;
1585d1f
+        }
1585d1f
       p = freopen (*opened_filename, FOPEN_RBIN, stdin);
1585d1f
       if (!p)
1585d1f
-        return 0;
1585d1f
+        {
1585d1f
+          free (command);
1585d1f
+          return 0;
1585d1f
+        }
1585d1f
       p = popen (command, "r");
1585d1f
       if (!p)
1585d1f
         {
bc2165c
@@ -877,6 +883,7 @@ determine_file_type:
1585d1f
         }
1585d1f
       else
1585d1f
         *is_pipe = 1;
1585d1f
+      free (command);
1585d1f
       return p;
1585d1f
     }
1585d1f
   else
bc2165c
@@ -920,7 +927,10 @@ readfile (char *filename, int *sizep,
1585d1f
                                      &pipe_p);
1585d1f
 
1585d1f
   if (!f)
1585d1f
-    return 0;
1585d1f
+    {
1585d1f
+      free (data);
1585d1f
+      return 0;
1585d1f
+    }
1585d1f
 
1585d1f
   for (;;)
1585d1f
     {
bc2165c
@@ -980,6 +990,7 @@ output_dirfile (char *dirfile, int dir_n
1585d1f
     {
1585d1f
       char *command = concat (compression_program, ">", dirfile_tmp);
1585d1f
       output = popen (command, "w");
1585d1f
+      free (command);
1585d1f
     }
1585d1f
   else
1585d1f
     output = fopen (dirfile_tmp, "w");
bc2165c
@@ -1721,6 +1732,8 @@ reformat_new_entries (struct spec_entry
1585d1f
 
1585d1f
       format_entry (name, name_len, desc, desc_len, calign, align, 
1585d1f
                     maxwidth, &entry->text, &entry->text_len);
1585d1f
+      free (desc);
1585d1f
+      free (name);
1585d1f
     }
1585d1f
 }
1585d1f