> From: cmpilato@tigris.org [mailto:cmpilato@tigris.org]
> Sent: Monday, March 10, 2003 2:23 PM
> Author: cmpilato
> Date: Mon Mar 10 07:22:27 2003
> New Revision: 5259
>
> Modified:
> trunk/subversion/libsvn_ra_dav/commit.c
> Log:
> * subversion/libsvn_ra_dav/commit.c
> (add_valid_target): Ensure proper lifetime of the paths in the hash.
>
> Modified: trunk/subversion/libsvn_ra_dav/commit.c
> ==============================================================================
> --- trunk/subversion/libsvn_ra_dav/commit.c (original)
> +++ trunk/subversion/libsvn_ra_dav/commit.c Mon Mar 10 07:22:27 2003
> @@ -661,7 +661,8 @@
> enum svn_recurse_kind kind)
> {
> apr_hash_t *hash = cc->valid_targets;
> - apr_hash_set (hash, path, APR_HASH_KEY_STRING, &kind);
> + svn_string_t *path_str = svn_string_create(path, apr_hash_pool_get(hash));
> + apr_hash_set (hash, path_str->data, path_str->len, &kind);
> }
Why not just like so?
apr_hash_set (hash, apr_pstrdup (apr_hash_pool_get (hash), path),
APR_HASH_KEY_STRING, &kind);
Sander
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 10 14:55:26 2003