Merge pull request #62 from grahamboree/master
A few edge-case memory leak fixes and an uninitialized pointer.
This commit is contained in:
commit
2fe5c4fb0c
@ -178,6 +178,7 @@ bool InputGeom::load(rcContext* ctx, const char* filePath)
|
||||
fclose(fp);
|
||||
if (readLen != 1)
|
||||
{
|
||||
delete[] buf;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -155,6 +155,7 @@ bool rcMeshLoaderObj::load(const char* filename)
|
||||
|
||||
if (readLen != 1)
|
||||
{
|
||||
delete[] buf;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -768,7 +768,7 @@ class TempObstacleCreateTool : public SampleTool
|
||||
|
||||
public:
|
||||
|
||||
TempObstacleCreateTool()
|
||||
TempObstacleCreateTool() : m_sample(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -110,6 +110,7 @@ bool TestCase::load(const char* filePath)
|
||||
fclose(fp);
|
||||
if (readLen != 1)
|
||||
{
|
||||
delete[] buf;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -261,6 +261,7 @@ bool imguiRenderGLInit(const char* fontpath)
|
||||
fclose(fp);
|
||||
if (readLen != size)
|
||||
{
|
||||
free(ttfBuffer);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user