[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Error leak in libsvn_fs_base/bdb/env.c

From: Vlad Georgescu <vgeorgescu_at_gmail.com>
Date: 2007-01-11 00:16:13 CET

bdb_close() in libsvn_fs_base/bdb/env.c currently leaks the pending
errors from BDB if it runs into a DB_RECOVERY error while closing
the database (it ignores the DB_RECOVERY error, but forgets to clear
the list of errors from the error_info structure). The following patch
solves this problem, but I'm not familiar with that code so I thought
I'd run this by the list:

Index: subversion/libsvn_fs_base/bdb/env.c
===================================================================
--- subversion/libsvn_fs_base/bdb/env.c (revision 22952)
+++ subversion/libsvn_fs_base/bdb/env.c (working copy)
@@ -492,6 +492,11 @@
      errors, since they're dealt with eventually by BDB itself. */
   if (db_err && (!SVN_BDB_AUTO_RECOVER || db_err != DB_RUNRECOVERY))
     err = convert_bdb_error(bdb, db_err);
+ else
+ {
+ bdb_error_info_t *error_info = get_error_info(bdb);
+ svn_error_clear(error_info->pending_errors);
+ }
 
   /* Free the environment descriptor. The pool cleanup will do this unless
      the cache has already been destroyed. */

-- 
Vlad
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 11 00:16:26 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.