diff options
author | Jim Meyering <meyering@fb.com> | 2013-12-14 10:13:25 -0800 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2013-12-18 10:38:36 -0800 |
commit | 6f20f5412ef66885ab3df08ad2b6f598ad36fe18 (patch) | |
tree | b3c52ec13f86b442122d1a709ffacdbe0a167308 | |
parent | 354209b0cfc5402aa1ebd8835135e04e36a3a6f4 (diff) | |
download | grep-6f20f5412ef66885ab3df08ad2b6f598ad36fe18.tar.gz |
pcre: avoid a nominal leak
* src/pcresearch.c (Pcompile)[HAVE_LIBPCRE && !PCRE_STUDY_JIT_COMPILE]:
We would leak "re" if built with HAVE_LIBPCRE but without
PCRE_STUDY_JIT_COMPILE. Move the free out one level.
-rw-r--r-- | src/pcresearch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pcresearch.c b/src/pcresearch.c index 67dee45e..7e81a317 100644 --- a/src/pcresearch.c +++ b/src/pcresearch.c @@ -126,8 +126,8 @@ Pcompile (char const *pattern, size_t size) _("failed to allocate memory for the PCRE JIT stack")); pcre_assign_jit_stack (extra, NULL, jit_stack); } - free (re); # endif + free (re); #endif /* HAVE_LIBPCRE */ } |