diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-05-18 21:57:25 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-05-18 22:53:07 -0600 |
commit | ea74ff717a4ba16fc7b858acd65cc2c893970c30 (patch) | |
tree | 40397d9f57e02aabcbd7774ebb1a54aea20e918d /regcomp.c | |
parent | cbeadc216ed61f4fa8583ce195c1eddd4eb9384f (diff) | |
download | perl-ea74ff717a4ba16fc7b858acd65cc2c893970c30.tar.gz |
regcomp.c: Fix regression memory leak
I carelessly added this memory leak which happens in a bracketed
character class under /i when there is both a above 255 code point
listed plus one of the several below 256 code points that participate
in a fold with ones above 256.
For 5.16, as the use of the inversion list data structure expands, an
automatic method of freeing space will need to be put in place. But
this should be sufficient for 5.14.1.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -10271,7 +10271,9 @@ parseit: /* Combine the two lists into one. */ if (l1_fold_invlist) { if (nonbitmap) { - nonbitmap = invlist_union(nonbitmap, l1_fold_invlist); + HV* temp = invlist_union(nonbitmap, l1_fold_invlist); + invlist_destroy(nonbitmap); + nonbitmap = temp; } else { nonbitmap = l1_fold_invlist; |