mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 04:50:07 +00:00
(re_compile_internal): If clearing buffer, clear allocated too.
This commit is contained in:
parent
4dd98447be
commit
ca3c505e44
@ -1,5 +1,5 @@
|
||||
/* Extended regular expression matching and search library.
|
||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
|
||||
|
||||
@ -752,6 +752,7 @@ re_compile_internal (preg, pattern, length, syntax)
|
||||
{
|
||||
re_free (dfa);
|
||||
preg->buffer = NULL;
|
||||
preg->allocated = 0;
|
||||
return err;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
@ -765,6 +766,7 @@ re_compile_internal (preg, pattern, length, syntax)
|
||||
{
|
||||
re_free (dfa);
|
||||
preg->buffer = NULL;
|
||||
preg->allocated = 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -792,6 +794,7 @@ re_compile_internal (preg, pattern, length, syntax)
|
||||
re_compile_internal_free_return:
|
||||
free_dfa_content (dfa);
|
||||
preg->buffer = NULL;
|
||||
preg->allocated = 0;
|
||||
}
|
||||
|
||||
return err;
|
||||
|
Loading…
Reference in New Issue
Block a user