summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorKarl <khw@karl.(none)>2009-01-25 19:02:13 -0700
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-01-26 09:32:50 +0100
commitb3a04dd304972047fb13ae81948fa8b870cd855a (patch)
tree8951de28ad4c8d26e6206aa33f415e2a954f1ea5 /regexec.c
parenta979ce91b3156b6065490e91b716d497fcb52adb (diff)
downloadperl-b3a04dd304972047fb13ae81948fa8b870cd855a.tar.gz
Fix memory leak
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/regexec.c b/regexec.c
index bc8da6e24b..45ece8e450 100644
--- a/regexec.c
+++ b/regexec.c
@@ -5807,6 +5807,9 @@ S_reginclass(pTHX_ const regexp *prog, register const regnode *n, register const
match = TRUE;
}
}
+
+ /* If we allocated a string above, free it */
+ if (! do_utf8) Safefree(utf8_p);
}
}
if (match && lenp && *lenp == 0)