# HG changeset patch # User Matti Hamalainen # Date 1587939710 -10800 # Node ID c1c37f6ca133ac3a5a94e4a28e91375ac4872c13 # Parent 905d30063e4558ae8c3a9cd4426a23ce5f5a536d Fix a silly memory leak in tests. diff -r 905d30063e45 -r c1c37f6ca133 tests.c --- 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)