[njs] Tests: freeing pcre structs to silence leak-sanitizer.
Dmitry Volyntsev
xeioex at nginx.com
Thu Apr 18 16:17:47 UTC 2019
details: https://hg.nginx.org/njs/rev/fca54d073408
branches:
changeset: 908:fca54d073408
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Thu Apr 18 19:17:22 2019 +0300
description:
Tests: freeing pcre structs to silence leak-sanitizer.
diffstat:
njs/test/njs_unit_test.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diffs (18 lines):
diff -r 7d2d28095c42 -r fca54d073408 njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c Wed Apr 17 18:00:56 2019 +0300
+++ b/njs/test/njs_unit_test.c Thu Apr 18 19:17:22 2019 +0300
@@ -12907,6 +12907,14 @@ njs_regexp_optional_test(nxt_bool_t disa
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;
}
More information about the nginx-devel
mailing list