diff options
Diffstat (limited to 'subversion/libsvn_fs/editor.c')
-rw-r--r-- | subversion/libsvn_fs/editor.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/subversion/libsvn_fs/editor.c b/subversion/libsvn_fs/editor.c index b4cd3bca3f3e3..c24c154e59cfa 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) |