Is #797 - use 'TidyRealloc' in place of raw 'realloc'

This commit is contained in:
Geoff McLane 2019-01-31 20:01:02 +01:00
parent 4b6849909d
commit e46435fb29
2 changed files with 2 additions and 2 deletions

View file

@ -798,7 +798,7 @@ void TY_(DefinePriorityAttribute)(TidyDocImpl* doc, ctmbstr name)
if ( priorities->count >= priorities->capacity )
{
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);

View file

@ -1350,7 +1350,7 @@ void TY_(DefineMutedMessage)(TidyDocImpl* doc, const TidyOptionImpl* opt, ctmbst
if ( list->count >= list->capacity )
{
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;