C++ port: fix memory leak in LuminanceSource::getMatrix()
authorflyashi <flyashi@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Thu, 29 Jul 2010 19:01:45 +0000 (19:01 +0000)
committerflyashi <flyashi@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Thu, 29 Jul 2010 19:01:45 +0000 (19:01 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@1497 59b500cc-1b3d-0410-9834-0bbf25fbcc57

cpp/core/src/zxing/LuminanceSource.cpp

index 9501d6e..23b1e8c 100644 (file)
@@ -38,6 +38,7 @@ unsigned char* LuminanceSource::getMatrix() {
     getRow(y, row);
     memcpy(&matrix[y * width], row, width);
   }
+  delete [] row;
   return matrix;
 }