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

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