Hi,
While freeing tag entries, make sure to free the copied strings.

Index: tags.c
===================================================================
RCS file: /cvs/src/usr.bin/less/tags.c,v
retrieving revision 1.18
diff -u -p -r1.18 tags.c
--- tags.c      17 Sep 2016 15:06:41 -0000      1.18
+++ tags.c      30 Apr 2017 18:13:24 -0000
@@ -77,6 +77,8 @@ cleantags(void)
         */
        while ((tp = taglist.tl_first) != TAG_END) {
                TAG_RM(tp);
+               free(tp->tag_file);
+               free(tp->tag_pattern);
                free(tp);
        }
        curtag = NULL;

Reply via email to