Is #797 - use 'TidyRealloc' in place of raw 'realloc'
This commit is contained in:
parent
4b6849909d
commit
e46435fb29
|
@ -798,7 +798,7 @@ void TY_(DefinePriorityAttribute)(TidyDocImpl* doc, ctmbstr name)
|
||||||
if ( priorities->count >= priorities->capacity )
|
if ( priorities->count >= priorities->capacity )
|
||||||
{
|
{
|
||||||
priorities->capacity = priorities->capacity * 2;
|
priorities->capacity = priorities->capacity * 2;
|
||||||
priorities->list = realloc( priorities->list, sizeof(tmbstr) * priorities->capacity + 1 );
|
priorities->list = TidyRealloc(doc->allocator, priorities->list, sizeof(tmbstr) * priorities->capacity + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
priorities->list[priorities->count] = TY_(tmbstrdup)( doc->allocator, name);
|
priorities->list[priorities->count] = TY_(tmbstrdup)( doc->allocator, name);
|
||||||
|
|
|
@ -1350,7 +1350,7 @@ void TY_(DefineMutedMessage)(TidyDocImpl* doc, const TidyOptionImpl* opt, ctmbst
|
||||||
if ( list->count >= list->capacity )
|
if ( list->count >= list->capacity )
|
||||||
{
|
{
|
||||||
list->capacity = list->capacity * 2;
|
list->capacity = list->capacity * 2;
|
||||||
list->list = realloc( list->list, sizeof(tidyStrings) * list->capacity + 1 );
|
list->list = TidyRealloc(doc->allocator, list->list, sizeof(tidyStrings) * list->capacity + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
list->list[list->count] = message;
|
list->list[list->count] = message;
|
||||||
|
|
Loading…
Reference in a new issue