mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
uemis: close reqtxt file in error case
Found by Coverity. Should switch to C++ "RAII" type, but no priority for now. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
2bbc95e8f1
commit
6d08903917
1 changed files with 1 additions and 0 deletions
|
@ -515,6 +515,7 @@ static std::string uemis_get_answer(const std::string &path, const std::string &
|
|||
int written = write(reqtxt_file, sb.c_str(), sb.size());
|
||||
if (written == -1 || (size_t)written != sb.size()) {
|
||||
error_text = translate("gettextFromC", ERR_FS_SHORT_WRITE);
|
||||
close(reqtxt_file);
|
||||
return std::string();
|
||||
}
|
||||
if (!next_file(number_of_files)) {
|
||||
|
|
Loading…
Reference in a new issue