Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-23 Thread Chris Hegarty
acle.com Cc: security-dev@openjdk.java.net Sent: Monday, October 22, 2012 4:53:56 AM GMT -05:00 US/Canada Eastern Subject: Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c John, Sorry for being later. Again, it's not to your changes but as well as you are touching this co

Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-23 Thread Dmitry Samersoff
AM GMT -05:00 US/Canada Eastern > Subject: Re: Memory leak fix for: > src/solaris/native/com/sun/security/auth/module/Unix.c > > John, > > Sorry for being later. Again, it's not to your changes but as well as > you are touching this code. > > 88, 103, 118:

Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-23 Thread John Zavgren
ohn.zavg...@oracle.com Cc: security-dev@openjdk.java.net Sent: Monday, October 22, 2012 4:53:56 AM GMT -05:00 US/Canada Eastern Subject: Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c John, Sorry for being later. Again, it's not to your changes but as well as y

Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-22 Thread Chris Hegarty
, 2012 10:18:56 AM GMT -05:00 US/Canada Eastern Subject: Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c Chris, On 2012-10-22 17:11, Chris Hegarty wrote: We should simply do: fid = (*env)->GetFieldID(env, cls, "uid", "J"); if (fid ==

Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-22 Thread John Zavgren
vg...@oracle.com, security-dev@openjdk.java.net Sent: Monday, October 22, 2012 10:18:56 AM GMT -05:00 US/Canada Eastern Subject: Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c Chris, On 2012-10-22 17:11, Chris Hegarty wrote: > We should simply do: >

Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-22 Thread Dmitry Samersoff
Chris, On 2012-10-22 17:11, Chris Hegarty wrote: > We should simply do: > fid = (*env)->GetFieldID(env, cls, "uid", "J"); > if (fid == 0) > goto cleanUpAndReturn; > > .. and forget the IAE lookup, etc.. I'm second for simple code above if now spec requires IAE here. Also it's

Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-22 Thread Chris Hegarty
Sent: Monday, October 22, 2012 9:10:59 AM GMT -05:00 US/Canada Eastern Subject: Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c > When "file ID equals zero" we return before the "ThrowNew()" call is made. Should this call be moved to immed

Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-22 Thread John Zavgren
: dmitry.samers...@oracle.com, security-dev@openjdk.java.net Sent: Monday, October 22, 2012 9:10:59 AM GMT -05:00 US/Canada Eastern Subject: Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c > When "file ID equals zero" we return before the "ThrowNew()"

Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-22 Thread Chris Hegarty
(*env)->ThrowNew(env, newExcCls, "invalid field: username"); goto cleanUpAndReturn; } } If I don't move the "ThrowNew()" statement then the calling code will never see the exception. Ideas? Thanks! John Zavgren - Original Message -

Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-22 Thread John Zavgren
then the calling code will never see the exception. Ideas? Thanks! John Zavgren - Original Message ----- From: dmitry.samers...@oracle.com To: john.zavg...@oracle.com Cc: security-dev@openjdk.java.net Sent: Monday, October 22, 2012 4:53:56 AM GMT -05:00 US/Canada Eastern Subject: Re: Memory leak fi

Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-22 Thread Dmitry Samersoff
John, Sorry for being later. Again, it's not to your changes but as well as you are touching this code. 88, 103, 118: Type-o - we are checking for uid,gid,groups field, but exception says "invalid field: username" in all cases. It's better to fix it as well. ??: Does it make sense to ab

Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-19 Thread Bradford Wetmore
sage - From: bradford.wetm...@oracle.com To: john.zavg...@oracle.com Cc: security-dev@openjdk.java.net Sent: Friday, October 19, 2012 8:11:03 PM GMT -05:00 US/Canada Eastern Subject: Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c Looks good, taken in isolation.

Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-19 Thread John Zavgren
src/solaris/native/com/sun/security/auth/module/Unix.c Looks good, taken in isolation. Just to be sure, are there any other methods that might return some object that has to be freed. Brad On 10/19/2012 1:28 PM, John Zavgren wrote: > Greetings: > The following webrev image contains

Re: Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-19 Thread Brad Wetmore
Looks good, taken in isolation. Just to be sure, are there any other methods that might return some object that has to be freed. Brad On 10/19/2012 1:28 PM, John Zavgren wrote: Greetings: The following webrev image contains a fix for a memory leak that occurs in the procedure: Java_com_sun

Memory leak fix for: src/solaris/native/com/sun/security/auth/module/Unix.c

2012-10-19 Thread John Zavgren
Greetings: The following webrev image contains a fix for a memory leak that occurs in the procedure: Java_com_sun_security_auth_module_UnixSystem_getUnixInfo (JNIEnv *env, jobject obj) in the file: jdk/src/solaris/native/com/sun/security/auth/module/Unix.c http://cr.openjdk.java.net/~khazra/joh