Merge pull request #626 from Ragora/bugfix-codechecker-warnings

BugFix: Correct a few memory leaks
This commit is contained in:
Brian Roberts 2021-10-14 20:05:23 -05:00 committed by GitHub
commit ce9f2e51e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -361,7 +361,9 @@ class StringBuilder
{
va_list args;
va_start(args, fmt);
return mFormat.formatAppend(fmt, args);
const S32 result = mFormat.formatAppend(fmt, args);
va_end(args);
return result;
}
};

View file

@ -471,6 +471,7 @@ static bool sReadTGA(Stream &stream, GBitmap *bitmap)
default:
//Con::errorf( "Unknown image type" );
delete[] colormap;
return false;
}