You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2012/11/21 21:22:31 UTC
svn commit: r1412269 -
/subversion/trunk/subversion/mod_dav_svn/reports/update.c
Author: cmpilato
Date: Wed Nov 21 20:22:30 2012
New Revision: 1412269
URL: http://svn.apache.org/viewvc?rev=1412269&view=rev
Log:
Fix a bit of pool usage sloppiness in mod_dav_svn's update logic.
* subversion/mod_dav_svn/reports/update.c
(send_propchange): Use a pool with a shorter lifetime for the
XML-quoted property name, and definitely don't bother dup'ing that
name (which is getting dropped directly onto the wire).
Modified:
subversion/trunk/subversion/mod_dav_svn/reports/update.c
Modified: subversion/trunk/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/update.c?rev=1412269&r1=1412268&r2=1412269&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/update.c Wed Nov 21 20:22:30 2012
@@ -618,12 +618,8 @@ send_propchange(item_baton_t *b,
{
const char *qname;
- /* Ensure that the property name is XML-safe.
- apr_xml_quote_string() doesn't realloc if there is nothing to
- quote, so dup the name, but only if necessary. */
- qname = apr_xml_quote_string(b->pool, name, 1);
- if (qname == name)
- qname = apr_pstrdup(b->pool, name);
+ /* Ensure that the property name is XML-safe. */
+ qname = apr_xml_quote_string(pool, name, 1);
if (value)
{