Commit 3f13424c authored by Julien Finet's avatar Julien Finet Committed by Marcus D. Hanwell
Browse files

BUG: Fix memory leaks found using dynamic analysis

parent 775065d2
...@@ -110,7 +110,7 @@ void vtkColorTransferFunctionItem::ComputeTexture() ...@@ -110,7 +110,7 @@ void vtkColorTransferFunctionItem::ComputeTexture()
values, values,
reinterpret_cast<unsigned char*>(this->Texture->GetScalarPointer(0,0,0)), reinterpret_cast<unsigned char*>(this->Texture->GetScalarPointer(0,0,0)),
VTK_DOUBLE,dimension,1,4); VTK_DOUBLE,dimension,1,4);
delete values; delete [] values;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
...@@ -131,7 +131,7 @@ void vtkCompositeTransferFunctionItem::ComputeTexture() ...@@ -131,7 +131,7 @@ void vtkCompositeTransferFunctionItem::ComputeTexture()
ptr+=4; ptr+=4;
} }
} }
delete values; delete [] values;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
...@@ -551,7 +551,7 @@ void vtkOpenGLContextDevice2D::DrawQuad(float *f, int n) ...@@ -551,7 +551,7 @@ void vtkOpenGLContextDevice2D::DrawQuad(float *f, int n)
glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY);
this->Storage->Texture->PostRender(this->Renderer); this->Storage->Texture->PostRender(this->Renderer);
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
delete texCoord; delete [] texCoord;
} }
} }
...@@ -580,7 +580,7 @@ void vtkOpenGLContextDevice2D::DrawPolygon(float *f, int n) ...@@ -580,7 +580,7 @@ void vtkOpenGLContextDevice2D::DrawPolygon(float *f, int n)
glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY);
this->Storage->Texture->PostRender(this->Renderer); this->Storage->Texture->PostRender(this->Renderer);
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
delete texCoord; delete [] texCoord;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment