summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-11-17 11:55:52 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-11-17 15:18:35 +0100
commitd6a3510ebc04dd5f24366f5b6426060cb149c3ff (patch)
treeb854ff3461b0003597f1bfddf4923b709471722f /sal
parent8c56abfa64be106c44b2d878968b9b019e126c40 (diff)
Revert "TempFile: clear handle on close"
This reverts commit 0d9613b77fc653c6144b5e4f0136c0536300c0db: As discussed in the comments at <https://gerrit.libreoffice.org/c/core/+/142344/2#message-c52fe7b2037e717525e89dd20a8f320142654ae0> "TempFile: clear handle on close", that change was intended to reset *pHandle to null in cases where osl_createTempFile returns an error and has already set *pHandle. But that is obviously not what the change actually does, it rather sets *pHandle to null in (only some of the) cases where osl_createTempFile returns an error and has not modified *pHandle. Given that there may potentially be clients that rely on osl_createTempFile not modifying the passed in *pHandle when it returns an error, and given that the sal/osl/unx/tempfile.cxx implementation of osl_createTempFile now inconsistently set *pHandle to null in only some of the cases where it returns an error while the sal/osl/w32/tempfile.cxx implementation of osl_createTempFile never sets *pHandle to null when it returns an error, it appears best to just revert that change. Change-Id: Ia68353d04a488b024573ad03de0c5e5bd6e2a2c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142798 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/tempfile.cxx6
1 files changed, 0 insertions, 6 deletions
diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx
index 3a7138b5218d..29a4d453f80c 100644
--- a/sal/osl/unx/tempfile.cxx
+++ b/sal/osl/unx/tempfile.cxx
@@ -330,13 +330,7 @@ oslFileError SAL_CALL osl_createTempFile(
}
if (temp_file_handle)
- {
osl_closeFile(temp_file_handle);
- if (pHandle)
- {
- *pHandle = nullptr;
- }
- }
rtl_uString_release(base_directory);