iliaa Tue Nov 12 12:41:27 2002 EDT
Modified files:
/php4/ext/mbstring mbregex.c
Log:
Fixed a memory leak.
Index: php4/ext/mbstring/mbregex.c
diff -u php4/ext/mbstring/mbregex.c:1.15 php4/ext/mbstring/mbregex.c:1.16
--- php4/ext/mbstring/mbregex.c:1.15 Sat Nov 2 08:38:32 2002
+++ php4/ext/mbstring/mbregex.c Tue Nov 12 12:41:26 2002
@@ -1446,6 +1446,9 @@
snprintf(error_msg, ERROR_MSG_MAX_SIZE,
"invalid regular expression; there's no previous pattern, to which
'%c' would define cardinality at %d",
c, p-pattern);
+ if (bufp->buffer) {
+ xfree(bufp->buffer);
+ }
FREE_AND_RETURN(stackb, error_msg);
}
/* If there is a sequence of repetition chars,
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php