texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[8323] parsetexi try to clear up a few memory leaks


From: gavinsmith0123
Subject: [8323] parsetexi try to clear up a few memory leaks
Date: Thu, 18 Oct 2018 07:35:53 -0400 (EDT)

Revision: 8323
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8323
Author:   gavin
Date:     2018-10-18 07:35:53 -0400 (Thu, 18 Oct 2018)
Log Message:
-----------
parsetexi try to clear up a few memory leaks

Modified Paths:
--------------
    trunk/tp/Texinfo/XS/parsetexi/end_line.c
    trunk/tp/Texinfo/XS/parsetexi/input.c
    trunk/tp/Texinfo/XS/parsetexi/parser.c

Modified: trunk/tp/Texinfo/XS/parsetexi/end_line.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/end_line.c    2018-10-18 10:59:51 UTC (rev 
8322)
+++ trunk/tp/Texinfo/XS/parsetexi/end_line.c    2018-10-18 11:35:53 UTC (rev 
8323)
@@ -1653,6 +1653,7 @@
                     }
                 }
 
+              free (global_documentlanguage);
               global_documentlanguage = strdup (text);
               /* FIXME: check customization variable */
             }

Modified: trunk/tp/Texinfo/XS/parsetexi/input.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/input.c       2018-10-18 10:59:51 UTC (rev 
8322)
+++ trunk/tp/Texinfo/XS/parsetexi/input.c       2018-10-18 11:35:53 UTC (rev 
8323)
@@ -505,7 +505,6 @@
 input_reset_input_stack (void)
 {
   int i;
-  input_number = 0;
   for (i = 0; i < input_number; i++)
     {
       switch (input_stack[i].type)

Modified: trunk/tp/Texinfo/XS/parsetexi/parser.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/parser.c      2018-10-18 10:59:51 UTC (rev 
8322)
+++ trunk/tp/Texinfo/XS/parsetexi/parser.c      2018-10-18 11:35:53 UTC (rev 
8323)
@@ -120,6 +120,7 @@
 void
 set_documentlanguage (char *value)
 {
+  free (global_documentlanguage);
   global_documentlanguage = value;
 }
 
@@ -249,9 +250,10 @@
   free (global_documentlanguage);
   global_clickstyle = strdup ("arrow");
   global_documentlanguage = strdup ("");
-
   global_kbdinputstyle = kbd_distinct;
 
+  free (global_info.input_perl_encoding);
+
   free (global_info.footnotes.contents.list);
 
 #define GLOBAL_CASE(cmx) \




reply via email to

[Prev in Thread] Current Thread [Next in Thread]