[17299] in Kerberos_V5_Development

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

Re: For review: GSS memory allocation patch

daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Oct 14 12:35:55 2011

Message-ID: <4E9864E6.2050206@mit.edu>
Date: Fri, 14 Oct 2011 12:35:50 -0400
From: Greg Hudson <ghudson@mit.edu>
MIME-Version: 1.0
To: Kevin Wasserman <krwasserman@hotmail.com>
In-Reply-To: <SNT101-DS14430F09D3E4FA6DFDC367B5E10@phx.gbl>
Cc: Sam Hartman <hartmans@mit.edu>, "krbdev@mit.edu" <krbdev@mit.edu>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu

On 10/14/2011 12:16 PM, Kevin Wasserman wrote:
> That all sounds reasonable to me, though personally I would argue
> that if the contract is to always completely destroy the data list,
> I would keep the extra indirection and set it to NULL before
> completion.

That practice is consistent with the GSSAPI but not with most krb5 code.
 Note that none of the krb5_free_foo functions take an extra layer of
indirection.

> Actually, previously, the list _elements_ were all
> destroyed, but not the list itself; would you actually prefer that
> behavior?

If I understand you, that's incorrect.  Prior to your recent change, the
list itself was completely destroyed on success, and left completely
alone on failure.

After everything is cleaned up, the list itself should be destroyed on
success or failure, since we cannot easily leave it completely alone on
failure.
_______________________________________________
krbdev mailing list             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

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