summaryrefslogtreecommitdiff
path: root/ext/mbstring/mbregex.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2002-10-08 14:57:06 +0000
committerIlia Alshanetsky <iliaa@php.net>2002-10-08 14:57:06 +0000
commit8f4276b61d720a700ab2213de3cb82c41300f2b4 (patch)
treea421208c1b6be79e048487e7c0f0852e1b4d22e8 /ext/mbstring/mbregex.c
parentbe7da25930b3c5ae4a732752cda5aa9618d9cae1 (diff)
downloadphp-git-8f4276b61d720a700ab2213de3cb82c41300f2b4.tar.gz
Fixed memory leak.
Diffstat (limited to 'ext/mbstring/mbregex.c')
-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));