subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1037466 - /subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c
Date Sun, 21 Nov 2010 14:18:10 GMT
Author: stefan2
Date: Sun Nov 21 14:18:09 2010
New Revision: 1037466

URL: http://svn.apache.org/viewvc?rev=1037466&view=rev
Log:
Fix an error leak in the cached file handle destructor
(called during pool cleanup).

* subversion/libsvn_subr/svn_file_handle_cache.c
  (close_handle_before_cleanup): clear error

Modified:
    subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c

Modified: subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c?rev=1037466&r1=1037465&r2=1037466&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c (original)
+++ subversion/branches/performance/subversion/libsvn_subr/svn_file_handle_cache.c Sun Nov
21 14:18:09 2010
@@ -526,6 +526,7 @@ close_handle_before_cleanup(void *handle
 {
   svn_file_handle_cache__handle_t *f = handle_void;
   svn_error_t *err = SVN_NO_ERROR;
+  apr_status_t result = APR_SUCCESS;
 
   /* if this hasn't been done before: 
    * "close" the handle, i.e. return it to the cache 
@@ -537,7 +538,14 @@ close_handle_before_cleanup(void *handle
   f->entry = NULL;
   f->cache = NULL;
 
-  return err ? err->apr_err : APR_SUCCESS;
+  /* process error returns */
+  if (err)
+    {
+      result = err->apr_err;
+      svn_error_clear(err);
+    }
+
+  return result;
 }
 
 /* Create a cached file handle to be returned to the application in F for



Mime
View raw message