Services4User review

Greg Hudson ghudson at MIT.EDU
Fri Sep 11 10:35:21 EDT 2009


On Fri, 2009-09-11 at 02:00 -0400, Luke Howard wrote:
> However, if the caller does not check for nullity, the krb5_free  
> functions must. Which is it to be?

krb5_free functions must check for nullity before dereferencing
pointers.  However, we've made the decision to rely on free(NULL) being
a no-op in our code base.  So:

  * In krb5_free_checksum_contents, val->contents can be freed and set
to NULL even if it is NULL to begin with, so the check you added for
non-nullity of val->contents is unnecessary.  (val itself is already
checked for nullity.)

  * In krb5_free_unparsed_name, val can be freed even if it is NULL.





More information about the krbdev mailing list