2011-09-22, 19:41
Hi folks,
Sentry (our C++ static analysis tool) reported a memory leak last night that appears to have been introduced in this commit: https://github.com/xbmc/xbmc/commit/678f90b
Here's a patch that should fix it:
(We've added xbmc to our open source analysis project, so we'll be looking for bugs in it on a daily basis.)
Thanks!
Mike
Sentry (our C++ static analysis tool) reported a memory leak last night that appears to have been introduced in this commit: https://github.com/xbmc/xbmc/commit/678f90b
Here's a patch that should fix it:
Code:
diff --git a/xbmc/guilib/JpegIO.cpp b/xbmc/guilib/JpegIO.cpp
index 0e27d44..207c697 100644
--- a/xbmc/guilib/JpegIO.cpp
+++ b/xbmc/guilib/JpegIO.cpp
@@ -273,6 +273,7 @@ bool CJpegIO::Decode(const unsigned char *pixels, unsigned i
}
dst += pitch;
}
+ delete[] row;
}
else
{
(We've added xbmc to our open source analysis project, so we'll be looking for bugs in it on a daily basis.)
Thanks!
Mike