[1754] in Moira

home help back first fref pref prev next nref lref last post

Re: changes to setpw.c

daemon@ATHENA.MIT.EDU (Ezra Peisach)
Mon Mar 19 16:28:06 2001

Message-Id: <10103192127.AA01293@kangaroo.mit.edu>
To: "David E. Tanner" <dtanner@mit.edu>
Cc: moiradev@mit.edu
In-Reply-To: Your message of "Mon, 19 Mar 2001 16:15:29 EST."
             <3.0.32.20010319161528.0119d008@po14.mit.edu> 
Date: Mon, 19 Mar 2001 16:27:33 EST
From: Ezra Peisach <epeisach@MIT.EDU>


Personally, I have not looked at the entire code base, but a 
coding style recommendation...

You have code:
#ifdef _WIN32
      krb5_free_data_contents(context, &chpw_req);
#else
      free(chpw_req.data);
#endif

in the original and modified code...

Just use krb5_free_data_contents... I understand why on windows
you do not want to free the memory directly memory allocated from a 
library - but the same code will 
work under unix using krb5_free_data_contents in all cases.

(actually, it might be better to use krb5_free_data_contents instead of
simply freeing - as chpw_req.data might be null - which the library routine
checks before freeing...

	Ezra

home help back first fref pref prev next nref lref last post