summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index cc0452466e..08cf6a9298 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -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;