<AWT Dev> [OpenJDK 2D-Dev] [PATCH] memory leak in LCMS.c

Alexey Ushakov Alexey.Ushakov at Sun.COM
Thu Nov 22 14:11:49 PST 2007


Yes, I'll look into it.

Best Regards,
Alexey

Phil Race wrote:
> This should be 2d-dev.
>
> Alexey, can you take care of this.
>
> thx,
>
> -phil.
>
> Thomas Fitzsimmons wrote:
>> Hi,
>>
>> Java_sun_java2d_cmm_lcms_LCMS_loadProfile gets its data parameter's 
>> byte array elements but does not release them.  A fix is attached.
>>
>> Tom
>> ------------------------------------------------------------------------
>>
>> --- openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c.orig    
>> 2007-11-17 11:07:47.000000000 -0500
>> +++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c    
>> 2007-11-17 11:12:47.000000000 -0500
>> @@ -182,6 +182,8 @@
>>  
>>      sProf.pf = cmsOpenProfileFromMem((LPVOID)dataArray, (DWORD) 
>> dataSize);
>>  
>> +    (*env)->ReleaseByteArrayElements (env, data, dataArray, 0);
>> +
>>      if (sProf.pf == NULL) {
>>          JNU_ThrowIllegalArgumentException(env, "Invalid profile data");
>>      }
>>   
>




More information about the awt-dev mailing list