diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-03-14 15:20:28 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-03-14 16:44:10 -0500 |
commit | 8ed8ca0721e08ea953f4751086c4845c98551c46 (patch) | |
tree | e8a0adf76e26d24fd4932bd9427e6f094b63ef09 | |
parent | 98d5054caaf3439baeed13c3574a368e45a9a086 (diff) | |
download | wix-8ed8ca0721e08ea953f4751086c4845c98551c46.tar.gz wix-8ed8ca0721e08ea953f4751086c4845c98551c46.tar.bz2 wix-8ed8ca0721e08ea953f4751086c4845c98551c46.zip |
Don't close handles from MsiBeginTransaction.
Assume that MsiEndTransaction must be called exactly once for each MsiBeginTransaction.
Fixes 6695
-rw-r--r-- | src/burn/engine/apply.cpp | 8 | ||||
-rw-r--r-- | src/burn/engine/msiengine.cpp | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp index 4e652768..3ad22e9b 100644 --- a/src/burn/engine/apply.cpp +++ b/src/burn/engine/apply.cpp | |||
@@ -3123,12 +3123,10 @@ static HRESULT ExecuteMsiCommitTransaction( | |||
3123 | hr = MsiEngineCommitTransaction(pRollbackBoundary); | 3123 | hr = MsiEngineCommitTransaction(pRollbackBoundary); |
3124 | } | 3124 | } |
3125 | 3125 | ||
3126 | if (SUCCEEDED(hr)) | 3126 | // Assume that MsiEndTransaction can only be called once for each MsiBeginTransaction. |
3127 | { | 3127 | pRollbackBoundary->fActiveTransaction = FALSE; |
3128 | pRollbackBoundary->fActiveTransaction = FALSE; | ||
3129 | 3128 | ||
3130 | ResetTransactionRegistrationState(pEngineState, TRUE); | 3129 | ResetTransactionRegistrationState(pEngineState, TRUE); |
3131 | } | ||
3132 | 3130 | ||
3133 | LExit: | 3131 | LExit: |
3134 | if (fCommitBeginCalled) | 3132 | if (fCommitBeginCalled) |
diff --git a/src/burn/engine/msiengine.cpp b/src/burn/engine/msiengine.cpp index d306f3e0..d892b2bc 100644 --- a/src/burn/engine/msiengine.cpp +++ b/src/burn/engine/msiengine.cpp | |||
@@ -1129,8 +1129,7 @@ extern "C" HRESULT MsiEngineBeginTransaction( | |||
1129 | ExitOnFailure(hr, "Failed to begin an MSI transaction"); | 1129 | ExitOnFailure(hr, "Failed to begin an MSI transaction"); |
1130 | 1130 | ||
1131 | LExit: | 1131 | LExit: |
1132 | ReleaseMsi(hTransactionHandle); | 1132 | // Assume that MsiEndTransaction cleans up the handles. |
1133 | ReleaseHandle(hChangeOfOwnerEvent); | ||
1134 | 1133 | ||
1135 | return hr; | 1134 | return hr; |
1136 | } | 1135 | } |