mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-03 10:41:24 +00:00
Replace remaining instances of regular malloc/calloc/realloc/strdup with our memory error handler versions
git-svn-id: https://svn.eduke32.com/eduke32@7079 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9613bbac33
commit
1f8b23152e
21 changed files with 77 additions and 74 deletions
|
@ -802,13 +802,13 @@ int32_t mdloadskin(md2model_t *m, int32_t number, int32_t pal, int32_t surf)
|
|||
lastfn = fn; // careful...
|
||||
if (!lastpic)
|
||||
{
|
||||
lastpic = (coltype *)Bmalloc(siz.x*siz.y*sizeof(coltype));
|
||||
lastpic = (coltype *)Xmalloc(siz.x*siz.y*sizeof(coltype));
|
||||
lastsize = siz.x*siz.y;
|
||||
}
|
||||
else if (lastsize < siz.x*siz.y)
|
||||
{
|
||||
Bfree(lastpic);
|
||||
lastpic = (coltype *)Bmalloc(siz.x*siz.y*sizeof(coltype));
|
||||
lastpic = (coltype *)Xmalloc(siz.x*siz.y*sizeof(coltype));
|
||||
}
|
||||
if (lastpic)
|
||||
Bmemcpy(lastpic, pic, siz.x*siz.y*sizeof(coltype));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue