projects
/
vuplus_xbmc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84ba64d
)
Merge pull request #4891 from Memphiz/fixcximageleak
author
jmarshallnz
<jcmarsha@gmail.com>
Thu, 12 Jun 2014 01:59:20 +0000
(13:59 +1200)
committer
Jonathan Marshall
<jmarshall@xbmc.org>
Sun, 15 Jun 2014 04:25:15 +0000
(16:25 +1200)
[cximage] - fix big memory leak in raw image decoder - thx to smf007 for
lib/cximage-6.0/CxImage/ximaenc.cpp
patch
|
blob
|
history
diff --git
a/lib/cximage-6.0/CxImage/ximaenc.cpp
b/lib/cximage-6.0/CxImage/ximaenc.cpp
index
14e7890
..
ed8b779
100644
(file)
--- a/
lib/cximage-6.0/CxImage/ximaenc.cpp
+++ b/
lib/cximage-6.0/CxImage/ximaenc.cpp
@@
-815,10
+815,12
@@
bool CxImage::Decode(CxFile *hFile, DWORD imagetype)
if (newima.Decode( &hMemFile ))
{
Transfer(newima);
+ free(buffer);
return true;
}
else
hFile->Seek(pos, SEEK_SET);
+ free(buffer);
}
else
{
@@
-1063,11
+1065,13
@@
bool CxImage::Decode(CxFile *hFile, DWORD imagetype)
if (newima.Decode( &hMemFile ))
{
Transfer(newima);
+ free(buffer);
return true;
}
else
{
strcpy(info.szLastError,newima.GetLastError());
+ free(buffer);
return false;
}
}