Bug 457215 - Fix LCMS memory leak. r=vlad,a191=beltzner
☠☠ backed out by 3957258880e7 ☠ ☠
authorBobby Holley <bholley@cs.stanford.edu>
Fri, 28 Nov 2008 10:17:49 +0100
changeset 22075 52724975877131b7607539dfd73d25c5bf7c5247
parent 22074 0586ee185c87bf8e109d390d93ddc5df09ca7100
child 22076 ff61501bd8881b4a8510e823162d613b874e3be0
child 22088 3957258880e7d6f4a8a3c7b4aff5475666cbd3b1
push id3791
push userpvanderbeken@mozilla.com
push dateFri, 28 Nov 2008 09:19:30 +0000
treeherdermozilla-central@527249758771 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvlad
bugs457215
milestone1.9.1b3pre
Bug 457215 - Fix LCMS memory leak. r=vlad,a191=beltzner
modules/lcms/src/cmsprecache.c
--- a/modules/lcms/src/cmsprecache.c
+++ b/modules/lcms/src/cmsprecache.c
@@ -185,16 +185,22 @@ LCMSBOOL LCMSEXPORT cmsPrecacheProfile(c
                      break;
 
               default:
                      // TODO: change non-critical asserts to CMS warnings
                      CMSASSERT(0); // Not implemented
                      break;
        }
 
+       // Free the gamma tables
+       if (hasGammaTables) {
+              CMSASSERT(GTables[0] != NULL);
+              cmsFreeGammaTriple(GTables);
+       }
+
        // Success
        return TRUE;
 }
 
 /*
  * Frees a Precache structure.
  *
  * This function is invoked by the refcounting mechanism when the refcount on