From 7d288404c7277f47fc4c962c31bc22efd9d2ca62 Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 21 May 2014 18:09:14 +0800 Subject: [PATCH] libpcre does not use zmalloc --- src/node.c | 8 ++++++-- tests/bench_str.csv | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/node.c b/src/node.c index 838a50a..a0d19d9 100644 --- a/src/node.c +++ b/src/node.c @@ -75,12 +75,14 @@ void r3_tree_free(node * tree) { zfree(tree->edges); if (tree->routes) zfree(tree->routes); - if (tree->combined_pattern) - zfree(tree->combined_pattern); + /* if (tree->pcre_pattern) zfree(tree->pcre_pattern); if (tree->pcre_extra) zfree(tree->pcre_extra); + */ + if (tree->combined_pattern) + zfree(tree->combined_pattern); if (tree->ov) zfree(tree->ov); zfree(tree); @@ -203,10 +205,12 @@ void r3_tree_compile_patterns(node * n) { int erroffset; unsigned int option_bits = 0; + /* if (n->pcre_pattern) zfree(n->pcre_pattern); if (n->pcre_extra) zfree(n->pcre_extra); + */ // n->pcre_pattern; n->pcre_pattern = pcre_compile( diff --git a/tests/bench_str.csv b/tests/bench_str.csv index 22df891..7fb02ba 100644 --- a/tests/bench_str.csv +++ b/tests/bench_str.csv @@ -441,3 +441,5 @@ 1400655532,6648299.49 1400655542,6685928.45 1400659046,19754150.71 +1400666823,6406965.25 +1400666950,6684744.95