diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2020-06-30 16:40:53 +0100 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2020-07-01 00:05:41 +0200 |
commit | 0fdcd22117046df7f4867dffe460d9833b6d912e (patch) | |
tree | 9819dedc85d595201848228a8e01e6ab8d362e5a | |
parent | Bump package version to 4.2.5-3 (diff) | |
download | online-0fdcd22117046df7f4867dffe460d9833b6d912e.tar.gz online-0fdcd22117046df7f4867dffe460d9833b6d912e.zip |
Close files after copying, to avoid fd leak during convert-to.
Change-Id: I24a9726bfea7805aff61d778e9f8f91c5b1ffd52
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97508
Tested-by: Aron Budea <aron.budea@collabora.com>
Reviewed-by: Aron Budea <aron.budea@collabora.com>
-rw-r--r-- | common/FileUtil.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/FileUtil.cpp b/common/FileUtil.cpp index 793fc1e257..4d8ac0a560 100644 --- a/common/FileUtil.cpp +++ b/common/FileUtil.cpp @@ -145,6 +145,8 @@ namespace FileUtil LOG_WRN("Unusual: file " << anonymizeUrl(fromPath) << " changed size " "during copy from " << st.st_size << " to " << bytesIn); } + close(from); + close(to); } catch (...) { |