You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2012/05/01 04:58:28 UTC

svn commit: r1332508 - /subversion/trunk/subversion/libsvn_delta/compat.c

Author: gstein
Date: Tue May  1 02:58:27 2012
New Revision: 1332508

URL: http://svn.apache.org/viewvc?rev=1332508&view=rev
Log:
Fix the pool lifetime for the CHANGES hash keys.

Found by: hwright

* subversion/libsvn_delta/compat.c:
  (insert_change): dup the relpath key into the result pool

Modified:
    subversion/trunk/subversion/libsvn_delta/compat.c

Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1332508&r1=1332507&r2=1332508&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Tue May  1 02:58:27 2012
@@ -1042,7 +1042,9 @@ insert_change(const char *relpath,
   change->changing = SVN_INVALID_REVNUM;
   change->deleting = SVN_INVALID_REVNUM;
 
-  apr_hash_set(changes, relpath, APR_HASH_KEY_STRING, change);
+  apr_hash_set(changes,
+               apr_pstrdup(result_pool, relpath), APR_HASH_KEY_STRING,
+               change);
 
   return change;
 }