From: Dmitry Volyntsev Date: Thu, 18 Apr 2019 16:17:22 +0000 (+0300) Subject: Tests: freeing pcre structs to silence leak-sanitizer. X-Git-Tag: 0.3.2~65 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=33d8cb138cd97d5be996b3fa9434f353c8396aa1;p=njs.git Tests: freeing pcre structs to silence leak-sanitizer. --- diff --git a/njs/test/njs_unit_test.c b/njs/test/njs_unit_test.c index abf06d7d..5095daa4 100644 --- a/njs/test/njs_unit_test.c +++ b/njs/test/njs_unit_test.c @@ -12907,6 +12907,14 @@ njs_regexp_optional_test(nxt_bool_t disassemble, nxt_bool_t verbose) nxt_printf("njs unicode regexp tests skipped, libpcre fails\n"); } + if (re1 != NULL) { + pcre_free(re1); + } + + if (re2 != NULL) { + pcre_free(re2); + } + return NXT_OK; }