vile
[Top][All Lists]
Advanced

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

[PATCH 1/2] Apply some changes from pl-filt.c to pl6filt.c


From: Brendan O'Dea
Subject: [PATCH 1/2] Apply some changes from pl-filt.c to pl6filt.c
Date: Thu, 20 Jan 2022 21:43:44 +1100

It appears that a leak of `marker' was fixed in the former which didn't make
it to the latter.
---
 filters/pl6filt.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/filters/pl6filt.c b/filters/pl6filt.c
index 7148eb3..7cd5580 100644
--- a/filters/pl6filt.c
+++ b/filters/pl6filt.c
@@ -1548,8 +1548,10 @@ do_filter(FILE *input GCC_UNUSED)
                            state = eHERE;
                            mark_len = 0;
                            try_mark = do_alloc(0, (size_t) 2, &mark_len);
-                           if (try_mark != 0)
+                           if (try_mark != 0) {
+                               free(marker);
                                marker = strcpy(try_mark, ".");
+                           }
                        }
                        save = s[ok];
                        s[ok] = 0;
@@ -1659,6 +1661,7 @@ do_filter(FILE *input GCC_UNUSED)
        }
        free(the_file);
     }
+    free(marker);
 }
 
 #if NO_LEAKS
-- 
2.34.1



reply via email to

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