PATCH for Coverity issues

Simo simo at samba.org
Thu Feb 20 06:22:21 MST 2014


On Thu, 2014-02-20 at 18:49 +0530, Santosh Pradhan wrote:
> Thanks for the quick reply.
> 
> On 02/20/2014 06:26 PM, Volker Lendecke wrote:
> > On Thu, Feb 20, 2014 at 06:21:10PM +0530, Santosh Pradhan wrote:
> >
> >> What about the 2nd patch ?
> > For this one people more familiar with the krb5 libraries
> > should comment. I'm not sure a plain "free" here is the
> > right thing. There's a ton of "krb5_free_something" routines
> > used, and I don't know if there's a "krb5_free_realm"
> > function or "krb5_free_string" that would be more
> > appropriate in this context.
> 
> Yes, I was thinking of using krb5_free_default_realm() which takes a 
> context param (never used) along with realm param. Internally it 
> callskrb5_xfree() which is nothing but free(). But I found plain free() 
> is also used  e.g. in smb_krb5_make_principal() , FILE: 
> lib/krb5_wrap/krb5_samba.c.

Please use krb5_free_default_realm() and fix the other place where
free() is used directly too.

Simo.



More information about the samba-technical mailing list