changeset 710:c1c37f6ca133

Fix a silly memory leak in tests.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 27 Apr 2020 01:21:50 +0300
parents 905d30063e45
children c91902120e79
files tests.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests.c	Mon Apr 27 00:44:34 2020 +0300
+++ b/tests.c	Mon Apr 27 01:21:50 2020 +0300
@@ -604,7 +604,8 @@
         mt = (th_regex_match_t *) mt->node.next,
         nmatch++)
     {
-        char *match = th_strndup(str + mt->start, mt->len);
+        match = th_strndup(str + mt->start, mt->len);
+
         if (expected[nmatch] == NULL)
         {
             if (!testOnly)