mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Fixed a memory leak.
This commit is contained in:
parent
0f2ae50178
commit
d84afe1121
@ -1446,6 +1446,9 @@ re_compile_pattern(pattern, size, bufp)
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user