[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Don't leak SASL contexts

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-08-21 17:01:21 CEST

On 8/19/06, Vlad Georgescu <vgeorgescu@gmail.com> wrote:
> [[[
> Make sure sasl contexts are always destroyed.
>
> * subversion/libsvn_ra_svn/sasl_auth.c
> (sasl_dispose_cb): New pool cleanup function.
> (new_sasl_ctx): Install the cleanup.
> (svn_ra_svn__do_auth): Don't call sasl_dispose.
> ]]]
>
> ===================================================================
> --- subversion/libsvn_ra_svn/sasl_auth.c (revision 21115)
> +++ subversion/libsvn_ra_svn/sasl_auth.c (working copy)
> @@ -162,6 +162,13 @@
> return SVN_NO_ERROR;
> }
>
> +static apr_status_t sasl_dispose_cb(void *data)
> +{
> + sasl_conn_t *sasl_ctx = (sasl_conn_t*) data;
> + sasl_dispose(&sasl_ctx);
> + return APR_SUCCESS;
> +}

That cast was unnecessary (and if it was necessary we'd put a space
between the sasl_cont_t and the *), so I dropped it, but other than
that it looks fine, so I just committed the tweaked version in r21140.

Thanks!

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Aug 21 17:02:57 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.