diff options
author | Miran <narimiran@disroot.org> | 2019-05-16 21:06:31 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-05-16 21:06:31 +0200 |
commit | 9d4190a5cc426dfbb515526d3c0b22c418e07d16 (patch) | |
tree | 56b46fc37f3b096f174ff2530970a3f0c3a042a3 /lib/impure/re.nim | |
parent | 8f198db2cae0af718a3563bba53f4caf9bc46748 (diff) | |
download | Nim-9d4190a5cc426dfbb515526d3c0b22c418e07d16.tar.gz |
fixes #11139 (re.nim memory leak) (#11265)
Use the same PCRE function for freeing up the memory as nre.nim does.
Diffstat (limited to 'lib/impure/re.nim')
-rw-r--r-- | lib/impure/re.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/impure/re.nim b/lib/impure/re.nim index 4f32cd5fb..34ccd8f1a 100644 --- a/lib/impure/re.nim +++ b/lib/impure/re.nim @@ -65,7 +65,7 @@ proc finalizeRegEx(x: Regex) = # Fortunately the implementation is unlikely to change. pcre.free_substring(cast[cstring](x.h)) if not isNil(x.e): - pcre.free_substring(cast[cstring](x.e)) + pcre.free_study(x.e) proc re*(s: string, flags = {reStudy}): Regex = ## Constructor of regular expressions. |