You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/07/04 22:54:00 UTC

svn commit: r1499867 - /subversion/trunk/subversion/libsvn_ra_serf/util.c

Author: rhuijben
Date: Thu Jul  4 20:54:00 2013
New Revision: 1499867

URL: http://svn.apache.org/r1499867
Log:
* subversion/libsvn_ra_serf/util.c
  (expat_response_handler): Reintroduce forced cleanup on error cases,
    that was accidentally removed in r1499386 and also perform this cleanup
    on xml parser errors. Replace variable with its constant value.

Found by: gstein

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/util.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1499867&r1=1499866&r2=1499867&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Thu Jul  4 20:54:00 2013
@@ -2578,7 +2578,9 @@ expat_response_handler(serf_request_t *r
       expat_status = XML_Parse(ectx->parser, data, (int)len,
                                at_eof /* isFinal */);
 
-      if (at_eof)
+      if (at_eof 
+          || ectx->inner_error
+          || expat_status != XML_STATUS_OK)
         {
           /* Release xml parser state/tables. */
           apr_pool_cleanup_run(ectx->cleanup_pool, &ectx->parser,
@@ -2594,8 +2596,7 @@ expat_response_handler(serf_request_t *r
          errors.  */
       SVN_ERR(ectx->inner_error);
       if (expat_status != XML_STATUS_OK)
-        return svn_error_createf(SVN_ERR_XML_MALFORMED,
-                                 ectx->inner_error,
+        return svn_error_createf(SVN_ERR_XML_MALFORMED, NULL,
                                  _("The %s response contains invalid XML"
                                    " (%d %s)"),
                                  ectx->handler->method,