texinfo-commits
[Top][All Lists]
Advanced

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

[8331] parsetexi copying small strings


From: gavinsmith0123
Subject: [8331] parsetexi copying small strings
Date: Thu, 18 Oct 2018 15:23:45 -0400 (EDT)

Revision: 8331
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8331
Author:   gavin
Date:     2018-10-18 15:23:45 -0400 (Thu, 18 Oct 2018)
Log Message:
-----------
parsetexi copying small strings

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

Modified: trunk/tp/Texinfo/XS/parsetexi/input.c
===================================================================
--- trunk/tp/Texinfo/XS/parsetexi/input.c       2018-10-18 19:14:53 UTC (rev 
8330)
+++ trunk/tp/Texinfo/XS/parsetexi/input.c       2018-10-18 19:23:45 UTC (rev 
8331)
@@ -624,12 +624,13 @@
       q = strchr (q + 1, '/');
     }
   if (p)
-    filename = strdup (p+1);
+    filename = save_string (p+1);
+  else
+    filename = save_string (filename);
 
   input_stack[input_number].type = IN_file;
   input_stack[input_number].file = stream;
-  input_stack[input_number].line_nr.file_name
-                                       = filename ? strdup (filename) : 0;
+  input_stack[input_number].line_nr.file_name = filename;
   input_stack[input_number].line_nr.line_nr = 0;
   input_stack[input_number].line_nr.macro = 0;
   input_stack[input_number].text = 0;




reply via email to

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