Blame SOURCES/texinfo-6.5-covscan-fixes.patch

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