Re: [Freeipa-devel] [PATCH] Use of pointer after free in ipa-join

2011-01-12 Thread Rob Crittenden
Jakub Hrozek wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/10/2011 04:37 PM, Jakub Hrozek wrote: Sorry, there's one more thing I haven't noticed before - please check the return value if strdup(); in the else branch. This comment was applicable to the ipa-rmkeytab patch. Ack to

Re: [Freeipa-devel] [PATCH] Use of pointer after free in ipa-join

2011-01-10 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/10/2011 04:37 PM, Jakub Hrozek wrote: > Sorry, there's one more thing I haven't noticed before - please check > the return value if strdup(); in the else branch. > This comment was applicable to the ipa-rmkeytab patch. Ack to this one. -BE

Re: [Freeipa-devel] [PATCH] Use of pointer after free in ipa-join

2011-01-10 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/10/2011 04:15 PM, Martin Kosek wrote: > On Mon, 2011-01-10 at 13:04 +0100, Jakub Hrozek wrote: > >> Nack, >> >> if(ptr) free(ptr); >> >> is redundant, freeing a NULL pointer is a no-op. Other that that, looks >> fine. > > Attaching fixed versio

Re: [Freeipa-devel] [PATCH] Use of pointer after free in ipa-join

2011-01-10 Thread Martin Kosek
On Mon, 2011-01-10 at 13:04 +0100, Jakub Hrozek wrote: > Nack, > > if(ptr) free(ptr); > > is redundant, freeing a NULL pointer is a no-op. Other that that, looks > fine. Attaching fixed version of patch. Martin >From fc89ce3e2b4378fcf9f6d9f18312d4d471a2c305 Mon Sep 17 00:00:00 2001 From: Marti

Re: [Freeipa-devel] [PATCH] Use of pointer after free in ipa-join

2011-01-10 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/10/2011 09:40 AM, Martin Kosek wrote: > On Fri, 2011-01-07 at 11:26 -0500, Adam Young wrote: >> Is there any chance that the point-to-a-pointer parameters will have >> valid values other than null passed in? Almost seems that by >> initializing

Re: [Freeipa-devel] [PATCH] Use of pointer after free in ipa-join

2011-01-10 Thread Martin Kosek
On Fri, 2011-01-07 at 11:26 -0500, Adam Young wrote: > Is there any chance that the point-to-a-pointer parameters will have > valid values other than null passed in? Almost seems that by > initializing them to null, you might be masking a memory leak. > > If not, then ACK Hello Adam, it is sa

Re: [Freeipa-devel] [PATCH] Use of pointer after free in ipa-join

2011-01-07 Thread Adam Young
On 01/07/2011 09:21 AM, Martin Kosek wrote: In some cases recently freed memory was used/freed again. This patch introduces more consistency between functions join_ldap/join_krb5 when dealing with affected variables. https://fedorahosted.org/freeipa/ticket/709