Checkout
kotkov
committed
on 24 Nov 15
Don't leave *conflict_p uninitialized if svn_repos_fs_commit_txn() fails
before calling the FS layer.

This function gives the same promises… Show more
Don't leave *conflict_p uninitialized if svn_repos_fs_commit_txn() fails

before calling the FS layer.

This function gives the same promises as svn_fs_commit_txn(), which always

sets the conflict variable to either NULL, or to a valid conflict string.

Make sure that we fulfil this contract even if the commit preparation fails

— e.g., when calling pre-commit hook or removing ephemeral txnprops.

* subversion/libsvn_repos/fs-wrap.c

 (svn_repos_fs_commit_txn): Start from setting *conflict_p to NULL.

* subversion/tests/libsvn_repos/repos-test.c

 (commit_aborted_txn, test_funcs): Add a test for this behavior.

Show less