aboutsummaryrefslogtreecommitdiff
path: root/subversion/libsvn_fs/editor.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2018-05-08 03:44:38 +0000
committerPeter Wemm <peter@FreeBSD.org>2018-05-08 03:44:38 +0000
commit3faf8d6bffc5d0fb2525ba37bb504c53366caf9d (patch)
tree7e47911263e75034b767fe34b2f8d3d17e91f66d /subversion/libsvn_fs/editor.c
parenta55fb3c0d5eca7d887798125d5b95942b1f01d4b (diff)
Import Subversion-1.10.0vendor/subversion/subversion-1.10.0
Notes
Notes: svn path=/vendor/subversion/dist/; revision=333347 svn path=/vendor/subversion/subversion-1.10.0/; revision=333348; tag=vendor/subversion/subversion-1.10.0
Diffstat (limited to 'subversion/libsvn_fs/editor.c')
-rw-r--r--subversion/libsvn_fs/editor.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/subversion/libsvn_fs/editor.c b/subversion/libsvn_fs/editor.c
index b4cd3bca3f3e..c24c154e59cf 100644
--- a/subversion/libsvn_fs/editor.c
+++ b/subversion/libsvn_fs/editor.c
@@ -777,16 +777,24 @@ svn_fs__editor_commit(svn_revnum_t *revision,
/* Clean up internal resources (eg. eb->root). This also allows the
editor infrastructure to know this editor is "complete". */
err = svn_editor_complete(editor);
+ if (err)
+ {
+ svn_fs_txn_t *txn = eb->txn;
+
+ eb->txn = NULL;
+ return svn_error_trace(svn_error_compose_create(
+ err,
+ svn_fs_abort_txn(txn, scratch_pool)));
+ }
/* Note: docco for svn_fs_commit_txn() states that CONFLICT_PATH will
be allocated in the txn's pool. But it lies. Regardless, we want
it placed into RESULT_POOL. */
- if (!err)
- err = svn_fs_commit_txn(&inner_conflict_path,
- revision,
- eb->txn,
- scratch_pool);
+ err = svn_fs_commit_txn(&inner_conflict_path,
+ revision,
+ eb->txn,
+ scratch_pool);
if (SVN_IS_VALID_REVNUM(*revision))
{
if (err)