(trunk libT) use tr_malloc() instead of malloc() in tr_loadFile() and in the fallback code for tr_valloc()
This commit is contained in:
parent
018b673acd
commit
4ecf0d36d1
|
@ -461,7 +461,7 @@ tr_loadFile( const char * path,
|
||||||
errno = err;
|
errno = err;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
buf = malloc( sb.st_size + 1 );
|
buf = tr_malloc( sb.st_size + 1 );
|
||||||
if( !buf )
|
if( !buf )
|
||||||
{
|
{
|
||||||
const int err = errno;
|
const int err = errno;
|
||||||
|
@ -1578,7 +1578,7 @@ tr_valloc( size_t bufLen )
|
||||||
buf = valloc( allocLen );
|
buf = valloc( allocLen );
|
||||||
#endif
|
#endif
|
||||||
if( !buf )
|
if( !buf )
|
||||||
buf = malloc( allocLen );
|
buf = tr_malloc( allocLen );
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue