Author: post
Date: 2013-03-25 21:48:27 +0100 (Mon, 25 Mar 2013)
New Revision: 530

Modified:
   RawSpeed/LJpegDecompressor.cpp
Log:
Fix leak if Nikon table is re-initialized.

Modified: RawSpeed/LJpegDecompressor.cpp
===================================================================
--- RawSpeed/LJpegDecompressor.cpp      2013-03-25 15:41:19 UTC (rev 529)
+++ RawSpeed/LJpegDecompressor.cpp      2013-03-25 20:48:27 UTC (rev 530)
@@ -467,8 +467,9 @@
   int temp;
   uint32 l;
 
-  htbl->bigTable = (int*)_aligned_malloc(size * sizeof(int), 16);
   if (!htbl->bigTable)
+    htbl->bigTable = (int*)_aligned_malloc(size * sizeof(int), 16);
+  if (!htbl->bigTable)
        ThrowRDE("Out of memory, failed to allocate %d bytes", 
size*sizeof(int));
   for (uint32 i = 0; i < size; i++) {
     ushort16 input = i << 2; // Calculate input value


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to