[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * install-info/install-info.c (main) <--descripti
From: |
Gavin D. Smith |
Subject: |
branch master updated: * install-info/install-info.c (main) <--description>: Free string when concatenating text. |
Date: |
Wed, 13 Sep 2023 13:21:36 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 7f772b4465 * install-info/install-info.c (main) <--description>: Free
string when concatenating text.
7f772b4465 is described below
commit 7f772b4465a963c8a8ef4f9e53bab593c2887b25
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Sep 13 18:21:28 2023 +0100
* install-info/install-info.c (main) <--description>:
Free string when concatenating text.
---
ChangeLog | 5 +++++
install-info/install-info.c | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index c9a275cbf5..35f240d2c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-09-13 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * install-info/install-info.c (main) <--description>:
+ Free string when concatenating text.
+
2023-09-13 Gavin Smith <gavinsmith0123@gmail.com>
* install-info/install-info.c (output_dirfile):
diff --git a/install-info/install-info.c b/install-info/install-info.c
index d555a3a428..750fb43461 100644
--- a/install-info/install-info.c
+++ b/install-info/install-info.c
@@ -2025,6 +2025,7 @@ main (int argc, char *argv[])
{
struct spec_entry *next;
size_t length = strlen (optarg);
+ char *old_text;
if (!entries_to_add)
{
@@ -2055,9 +2056,11 @@ main (int argc, char *argv[])
newline if we need one. Prepend a space if we have no
previous text, since eventually we will be adding the
"* foo ()." and we want to end up with a ". " for parsing. */
- next->text = concat (next->text ? next->text : " ",
+ old_text = next->text;
+ next->text = concat (old_text ? old_text : " ",
optarg,
optarg[length - 1] == '\n' ? "" : "\n");
+ free (old_text);
next->text_len = strlen (next->text);
}
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * install-info/install-info.c (main) <--description>: Free string when concatenating text.,
Gavin D. Smith <=