[[[ * subversion/libsvn_fs_util/caching.c (svn_fs__get_global_membuffer_cache): Fix a possible error leak. ]]]
Index: subversion/libsvn_fs_util/caching.c =================================================================== --- subversion/libsvn_fs_util/caching.c (revision 1032308) +++ subversion/libsvn_fs_util/caching.c (working copy) @@ -62,6 +62,7 @@ svn_fs__get_global_membuffer_cache(void) /* auto-allocate cache*/ apr_allocator_t *allocator = NULL; apr_pool_t *pool = NULL; + svn_error_t *err; if (apr_allocator_create(&allocator)) return NULL; @@ -75,12 +76,17 @@ svn_fs__get_global_membuffer_cache(void) apr_allocator_max_free_set(allocator, 1); pool = svn_pool_create_ex(NULL, allocator); - svn_cache__membuffer_cache_create - (&cache, - (apr_size_t)cache_size, - (apr_size_t)(cache_size / 16), - ! svn_fs_get_cache_config()->single_threaded, - pool); + err = svn_cache__membuffer_cache_create + (&cache, + (apr_size_t)cache_size, + (apr_size_t)(cache_size / 16), + ! svn_fs_get_cache_config()->single_threaded, + pool); + if (err) + { + svn_error_clear(err); + return NULL; + } } return cache;