Fix a pool usage asymmetry in FSFS' pack code.
Suggested by: ivan
* subversion/libsvn_fs_fs/pack.c
(initialize_pack_context): Create our temp files in the INFO_POOL context
just like we do in reset_pack_context.
@@ -277,6 +277,12 @@ initialize_pack_context(pack_context_t *context,
context->end_rev = shard_rev;
context->shard_end_rev = shard_rev + ffd->max_files_per_dir;
+ /* the pool used for temp structures */
+ context->info_pool = svn_pool_create(pool);
+ context->paths = svn_prefix_tree__create(context->info_pool);
+
+ context->flush_to_disk = flush_to_disk;
+
/* Create the new directory and pack file. */
context->shard_dir = shard_dir;
context->pack_file_dir = pack_file_dir;
@@ -304,15 +310,18 @@ initialize_pack_context(pack_context_t *context,
context->changes = apr_array_make(pool, max_items,
sizeof(svn_fs_fs__p2l_entry_t *));
SVN_ERR(svn_io_open_unique_file3(&context->changes_file, NULL, temp_dir,
- svn_io_file_del_on_close, pool, pool));
+ svn_io_file_del_on_close,
+ context->info_pool, pool));
context->file_props = apr_array_make(pool, max_items,
sizeof(svn_fs_fs__p2l_entry_t *));
SVN_ERR(svn_io_open_unique_file3(&context->file_props_file, NULL, temp_dir,
- svn_io_file_del_on_close, pool, pool));
+ svn_io_file_del_on_close,
+ context->info_pool, pool));
context->dir_props = apr_array_make(pool, max_items,
sizeof(svn_fs_fs__p2l_entry_t *));
SVN_ERR(svn_io_open_unique_file3(&context->dir_props_file, NULL, temp_dir,
- svn_io_file_del_on_close, pool, pool));
+ svn_io_file_del_on_close,
+ context->info_pool, pool));
/* noderev and representation item bucket */
context->rev_offsets = apr_array_make(pool, max_revs, sizeof(int));
@@ -325,12 +334,6 @@ initialize_pack_context(pack_context_t *context,
SVN_ERR(svn_io_open_unique_file3(&context->reps_file, NULL, temp_dir,
svn_io_file_del_on_close, pool, pool));
- /* the pool used for temp structures */
- context->info_pool = svn_pool_create(pool);
- context->paths = svn_prefix_tree__create(context->info_pool);
-
- context->flush_to_disk = flush_to_disk;
-
return SVN_NO_ERROR;
}
