Permalink
Browse files

[droid] plug potential memory leak

  • Loading branch information...
1 parent f5b9c77 commit 345216cd0f1a8eabb541ea8ebb414706336e43e3 Cory Fields committed Aug 6, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 xbmc/guilib/Texture.cpp
View
@@ -198,7 +198,10 @@ CBaseTexture *CBaseTexture::LoadFromFile(const CStdString& texturePath, unsigned
unsigned int inputBuffSize = file.Read(inputBuff, imgsize);
file.Close();
if (inputBuffSize != imgsize)
+ {
+ delete [] inputBuff;
return NULL;
+ }
CTexture *texture = new CTexture();
unsigned int width = file.GetIconWidth();
unsigned int height = file.GetIconHeight();

0 comments on commit 345216c

Please sign in to comment.