summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mbstring/mbregex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/mbstring/mbregex.c b/ext/mbstring/mbregex.c
index fcb1294314..e560763096 100644
--- a/ext/mbstring/mbregex.c
+++ b/ext/mbstring/mbregex.c
@@ -309,8 +309,10 @@ init_syntax_once()
int ch;
TSRMLS_FETCH();
- if (done)
- return;
+ if (done) {
+ efree(s);
+ return;
+ }
memset(re_syntax_table, 0, sizeof(re_syntax_table));